home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / vdl020d.zip / VDATES.DOC < prev    next >
Text File  |  1993-04-14  |  77KB  |  3,291 lines

  1. {
  2.  ════════════════════════════════════════════════════════════════════════════
  3.  
  4.  Visionix Date Functions Unit (VDATES)
  5.  Copyright 1991,92,93 Visionix
  6.  ALL RIGHTS RESERVED
  7.  
  8.  ────────────────────────────────────────────────────────────────────────────
  9.  
  10.  Revision history in reverse chronological order:
  11.  
  12.  Initials  Date      Comment
  13.  ────────  ────────  ────────────────────────────────────────────────────────
  14.  
  15.  lpg       03/21/92  Changed: TDateTime -> TDTime, DateTime -> TDateTime.
  16.  
  17.  lpg       03/13/93  Added Source Documentation
  18.  
  19.  mep       02/11/93  Cleaned up code for beta release
  20.  
  21.  jrt       02/08/93  Sync with beta 0.12 release
  22.  
  23.  lpg        1/13/93  Added: ValidDateTime
  24.  
  25.  mep       12/18/92  Added: TimeToStrHM and DateToStrDay for VCopy use.
  26.  
  27.  jrt       12/07/92  Sync with beta 0.11 release
  28.  
  29.  lpg       11/24/92  Modified & corrected DT functions,
  30.  
  31.  jrt       11/21/92  Sync with beta 0.08
  32.  
  33.  lpg       10/23/92  Made more Functions & Tested
  34.  
  35.  lpg       10/19/92  Created
  36.  
  37.  ════════════════════════════════════════════════════════════════════════════
  38.  
  39.   MUST CLEAN OUT COMMENT CODE BEFORE DISTRIBUTION!!!
  40.  
  41.   Caveats/Known Bugs
  42.  
  43.  
  44.      The following Functions are incomplete:
  45.        - All TDateTime Functions,
  46.        - All DT Functions
  47.  
  48.      Data for these Functions was not available at the time of this
  49.      release to complete them.
  50.  
  51.  ════════════════════════════════════════════════════════════════════════════
  52. }
  53.  
  54.  
  55. UNIT VDates;
  56.  
  57.  
  58. Uses
  59.  
  60.   VTypes,
  61.   VGen,
  62.   DOS;
  63.  
  64. {──────────────────────────────────────────────────────────────────────────}
  65.  
  66. Const
  67.  
  68.   cYearBase : WORD = 1992;   { [1925-2078] - need to get this dn to 1890! }
  69.   cDateBase : WORD = 0;      { 1850; }
  70.                              { [1850-2034] want yr=0 to handle all input  }
  71.  
  72.  
  73.   c12Hours  : WORD    = 43200;
  74.   c24Hours  : LONGINT = 86400;
  75.  
  76.   cMaxDate  : LONGINT = 0;
  77.  
  78.   cDayStr   : Array[0..6] of String[15] =
  79.                   ( 'Sunday',   'Monday', 'Tuesday', 'Wednesday',
  80.                     'Thursday', 'Friday', 'Saturday' );
  81.  
  82.   cMonthStr : Array[1..12] of String[12] =
  83.                   ( 'January',   'February', 'March',    'April',
  84.                     'May',       'June',     'July',     'August',
  85.                     'September', 'October',  'November', 'December' );
  86.  
  87.  
  88. Type
  89.  
  90.   TTime     = LONGINT; {unit=secs, Limit=00:00:00-23:59:59}
  91.   TDate     = LONGINT; {unit=days, Range=5,883,516.84yrs}
  92.   TDTime    = LONGINT; {unit=secs, Range=       68.09yrs}
  93.   TDay      = INTEGER; {0..6 = Sun..Sat}
  94.  
  95. {$IFNDEF TDateTime}
  96.   TDateTime = DateTime;  { TPW redefines DATETIME as TDATETIME }
  97. {$ENDIF}
  98.  
  99.   TDayofWeek = ( Sun, Mon, Tue, Wed, Thu, Fri, Sat );
  100.   TMonth     = ( January,   February, March,    April,
  101.                  May,       June,     July,     August,
  102.                  September, October,  November, December );
  103.  
  104. {────────────────────────────────────────────────────────────────────────────}
  105.  
  106. {----------------------}
  107. { Basic Time Functions }
  108. {----------------------}
  109.  
  110.  
  111. Function  DayOfWeek(              Date           : TDate     ) : INTEGER;
  112.  
  113. Function  LeapYearDays(           Year           : WORD      ) : INTEGER;
  114.  
  115. Function  DaysInMonth(            Month          : WORD;
  116.                                   Year           : WORD      ) : INTEGER;
  117.  
  118. Function  DayLightSavings(        Date           : TDate;
  119.                                   Hour           : WORD;
  120.                                   NoSupport      : BOOLEAN   ) : INTEGER;
  121.  
  122. Function  TimePM(                 Time           : TTime     ) : BOOLEAN;
  123.  
  124.  
  125.  
  126. Function  ValidTime(              Hrs            : WORD;
  127.                                   Mins           : WORD;
  128.                                   Secs           : WORD      ) : BOOLEAN;
  129.  
  130. Function  ValidTimeMap(           Hrs            : WORD;
  131.                                   Mins           : WORD;
  132.                                   Secs           : WORD      ) : BYTE;
  133.  
  134. Function  ValidDate(              Days           : WORD;
  135.                                   Mons           : WORD;
  136.                                   Yrs            : WORD      ) : BOOLEAN;
  137.  
  138. Function  ValidDateMap(           Days           : WORD;
  139.                                   Mons           : WORD;
  140.                                   Yrs            : WORD      ) : BYTE;
  141.  
  142. Function  ValidDateTime(          Hours          : WORD;
  143.                                   Minutes        : WORD;
  144.                                   Seconds        : WORD;
  145.                                   Days           : WORD;
  146.                                   Months         : WORD;
  147.                                   Year           : WORD      ) : BOOLEAN;
  148.  
  149.  
  150.  
  151. Function  ValidDT(                DT             : DateTime  ) : BOOLEAN;
  152.  
  153. Function  ValidPDT(               PDT            : LONGINT   ) : BOOLEAN;
  154.  
  155.  
  156. {------------------------}
  157. { Current Time Functions }
  158. {------------------------}
  159.  
  160.  
  161. Function  CurrTime                                             : TTime;
  162.  
  163. Function  CurrDate                                             : TDate;
  164.  
  165. Function  CurrDTime                                            : TDTime;
  166.  
  167. Procedure CurrDT(             Var DT             : TDateTime );
  168.  
  169. Function  CurrPDT                                              : LONGINT;
  170.  
  171. Function  CurrDay                                              : TDay;
  172.  
  173.  
  174. {---------------}
  175. { To/From Times }
  176. {---------------}
  177.  
  178.  
  179. {--------------------------}
  180. { One-Based Date Functions }
  181. { IE. 1/1/92 = 1Jan92      }
  182. {--------------------------}
  183.  
  184. {--TTime--}
  185.  
  186. Function  HMSToTime(              Hrs            : WORD;
  187.                                   Mins           : WORD;
  188.                                   Secs           : WORD      ) : TTime;
  189.  
  190. Procedure TimeToHMS(              Time           : TTime;
  191.                               VAR Hrs            : INTEGER;
  192.                               VAR Mins           : INTEGER;
  193.                               VAR Secs           : INTEGER   );
  194.  
  195. {--TDate--}
  196.  
  197. Function  DMYToDate(              Days           : WORD;
  198.                                   Mons           : WORD;
  199.                                   Yrs            : WORD      ) : TDate;
  200.  
  201. Procedure DateToDMY(              Date           : TDate;
  202.                               VAR Days           : INTEGER;
  203.                               VAR Mons           : INTEGER;
  204.                               VAR Yrs            : INTEGER   );
  205.  
  206. {--TDateTime--}
  207.  
  208. Function  ToDTime(                Hours          : WORD;
  209.                                   Minutes        : WORD;
  210.                                   Seconds        : WORD;
  211.                                   Days           : WORD;
  212.                                   Months         : WORD;
  213.                                   Years          : WORD      ) : TDTime;
  214.  
  215. Procedure FromDTime(              DT             : TDTime;
  216.                               VAR Hours          : INTEGER;
  217.                               VAR Minutes        : INTEGER;
  218.                               VAR Seconds        : INTEGER;
  219.                               VAR Day            : INTEGER;
  220.                               VAR Month          : INTEGER;
  221.                               VAR Year           : INTEGER   );
  222.  
  223. {--DateTime Structure--}
  224.  
  225. Procedure ToDT(               VAR DT             : TDateTime;
  226.                                   Hours          : WORD;
  227.                                   Minutes        : WORD;
  228.                                   Seconds        : WORD;
  229.                                   Days           : WORD;
  230.                                   Months         : WORD;
  231.                                   Years          : WORD      );
  232.  
  233. Function  DTtoLinear(             DT             : TDateTime ) : LONGINT;
  234.  
  235. Procedure LinearToDT(             L              : LONGINT;
  236.                               VAR DT             : TDateTime );
  237.  
  238.  
  239. {--Packed DateTime--}
  240.  
  241. Function  ToPDT(                  Hours          : WORD;
  242.                                   Minutes        : WORD;
  243.                                   Seconds        : WORD;
  244.                                   Days           : WORD;
  245.                                   Months         : WORD;
  246.                                   Years          : WORD      ) : LONGINT;
  247.  
  248. Procedure FromPDT(                PDT            : LONGINT;
  249.                               VAR Hours          : INTEGER;
  250.                               VAR Minutes        : INTEGER;
  251.                               VAR Seconds        : INTEGER;
  252.                               VAR Days           : INTEGER;
  253.                               VAR Months         : INTEGER;
  254.                               VAR Years          : INTEGER   );
  255.  
  256. Function  DTtoPDT(                DT             : TDateTime ) : LONGINT;
  257.  
  258. Procedure PDTtoDT(                PDT            : LONGINT;
  259.                               VAR DT             : DateTime  );
  260.  
  261.  
  262. {------------------------------}
  263. { Zero-Based Date Functions    }
  264. { IE. 0/0/92 = 1Jan92          }
  265. { (For Use With DateDiff Func) }
  266. {------------------------------}
  267.  
  268. Function  DMYToDateZ(             Days           : WORD;
  269.                                   Mons           : WORD;
  270.                                   Yrs            : WORD      ) : TDate;
  271.  
  272. Procedure DateZToDMY(             Date           : TDate;
  273.                               VAR Days           : INTEGER;
  274.                               VAR Mons           : INTEGER;
  275.                               VAR Yrs            : INTEGER   );
  276.  
  277. Function  ToDTimeZ(               Hours          : WORD;
  278.                                   Minutes        : WORD;
  279.                                   Seconds        : WORD;
  280.                                   Days           : WORD;
  281.                                   Months         : WORD;
  282.                                   Years          : WORD      ) : TDTime;
  283.  
  284. Procedure FromDTimeZ(             DT             : TDTime;
  285.                               VAR Hours          : INTEGER;
  286.                               VAR Minutes        : INTEGER;
  287.                               VAR Seconds        : INTEGER;
  288.                               VAR Day            : INTEGER;
  289.                               VAR Month          : INTEGER;
  290.                               VAR Year           : INTEGER   );
  291.  
  292. Function  DTZtoLinear(            DT             : TDateTime ) : LONGINT;
  293.  
  294. Procedure LinearToDTZ(            L              : LONGINT;
  295.                               Var DT             : TDateTime );
  296.  
  297.  
  298. {-----------------------}
  299. { Time String Functions }
  300. {-----------------------}
  301.  
  302.  
  303. Function  TimeToStr(              Time           : TTime     ) : STRING;
  304.  
  305. Function  TimeToStrPM(            Time           : TTime     ) : STRING;
  306.  
  307. Function  TimeToStrHM(            Time           : TTime     ) : STRING;
  308.  
  309. Function  DateToStr(              Date           : TDate     ) : STRING;
  310.  
  311. Function  DateToStrMDY(           Date           : TDate     ) : STRING;
  312.  
  313. Function  DateToStrDMY(           Date           : TDate     ) : STRING;
  314.  
  315. Function  DateToStrDay(           Date           : TDate     ) : STRING;
  316.  
  317. Function  DTimeToStr(             DT             : TDTime    ) : STRING;
  318.  
  319. Function  DTimeToStrMDY(          DT             : TDTime    ) : STRING;
  320.  
  321. Function  DTimeToStrDMY(          DT             : TDTime    ) : STRING;
  322.  
  323. Function  DTtoStr(                DT             : TDateTime ) : STRING;
  324.  
  325. Function  DTtoStrMDY(             DT             : TDateTime ) : STRING;
  326.  
  327. Function  DTtoStrDMY(             DT             : TDateTime ) : STRING;
  328.  
  329. Procedure StrToDT(                S              : STRING;
  330.                               Var DT             : TDateTime );
  331.  
  332. Function  PDTtoStr(               PDT            : LONGINT   ) : STRING;
  333.  
  334. Function  PDTtoStrMDY(            PDT            : LONGINT   ) : STRING;
  335.  
  336. Function  PDTtoStrDMY(            PDT            : LONGINT   ) : STRING;
  337.  
  338.  
  339. {---------------------}
  340. { Time Math Functions }
  341. {---------------------}
  342.  
  343. {--TTime--}
  344.  
  345. Function  IncTime(                Time           : TTime     ) : TTime;
  346.  
  347. Function  DecTime(                Time           : TTime     ) : TTime;
  348.  
  349. Function  AddTime(                Time           : TTime;
  350.                                   Hrs            : WORD;
  351.                                   Mins           : WORD;
  352.                                   Secs           : WORD      ) : TTime;
  353.  
  354. Function  SubTime(                Time           : TTime;
  355.                                   Hrs            : WORD;
  356.                                   Mins           : WORD;
  357.                                   Secs           : WORD      ) : TTime;
  358.  
  359. Procedure TimeDiff(               Time1          : TTime;
  360.                                   Time2          : TTime;
  361.                               VAR Hrs            : INTEGER;
  362.                               VAR Mins           : INTEGER;
  363.                               VAR Secs           : INTEGER   );
  364.  
  365. {--TDate--}
  366.  
  367. Function  IncDate(                Date           : TDate     ) : TDate;
  368.  
  369. Function  DecDate(                Date           : TDate     ) : TDate;
  370.  
  371. Function  AddDate(                Date           : TDate;
  372.                                   Days           : WORD;
  373.                                   Mons           : WORD;
  374.                                   Yrs            : WORD      ) : TDate;
  375.  
  376. Function  SubDate(                Date           : TDate;
  377.                                   Days           : WORD;
  378.                                   Mons           : WORD;
  379.                                   Yrs            : WORD      ) : TDate;
  380.  
  381. Procedure DateDiff(               Date1          : TDate;
  382.                                   Date2          : TDate;
  383.                               VAR Days           : INTEGER;
  384.                               VAR Mons           : INTEGER;
  385.                               VAR Yrs            : INTEGER   );
  386.  
  387. {--TDateTime--}
  388.  
  389. Function  IncDTime(               DT             : TDTime    ) : TDTime;
  390.  
  391. Function  DecDTime(               DT             : TDTime    ) : TDTime;
  392.  
  393. Function  AddDTime(               DT             : TDTime;
  394.                                   Hours          : WORD;
  395.                                   Minutes        : WORD;
  396.                                   Seconds        : WORD;
  397.                                   Days           : WORD;
  398.                                   Months         : WORD;
  399.                                   Years          : WORD      ) : TDTime;
  400.  
  401. Function  SubDTime(               DT1            : TDTime;
  402.                                   Hours          : WORD;
  403.                                   Minutes        : WORD;
  404.                                   Seconds        : WORD;
  405.                                   Days           : WORD;
  406.                                   Months         : WORD;
  407.                                   Years          : WORD      ) : TDTime;
  408.  
  409. Procedure DTimeDiff(              DT1            : TDTime;
  410.                                   DT2            : TDTime;
  411.                               VAR Hours          : INTEGER;
  412.                               VAR Minutes        : INTEGER;
  413.                               VAR Seconds        : INTEGER;
  414.                               VAR Days           : INTEGER;
  415.                               VAR Months         : INTEGER;
  416.                               VAR Years          : INTEGER   );
  417.  
  418. {--DateTime Structure--}
  419.  
  420. Procedure IncDT(              Var DT             : TDateTime );
  421.  
  422. Procedure DecDT(              Var DT             : TDateTime );
  423.  
  424. Procedure AddDT(              Var DT             : TDateTime;
  425.                                   Hours          : WORD;
  426.                                   Minutes        : WORD;
  427.                                   Seconds        : WORD;
  428.                                   Days           : WORD;
  429.                                   Months         : WORD;
  430.                                   Years          : WORD      );
  431.  
  432. Procedure SubDT(              Var DT             : TDateTime;
  433.                                   Hours          : WORD;
  434.                                   Minutes        : WORD;
  435.                                   Seconds        : WORD;
  436.                                   Days           : WORD;
  437.                                   Months         : WORD;
  438.                                   Years          : WORD      );
  439.  
  440. Procedure DTDiff(                 DT1            : TDateTime;
  441.                                   DT2            : TDateTime;
  442.                               VAR Hours          : INTEGER;
  443.                               VAR Minutes        : INTEGER;
  444.                               VAR Seconds        : INTEGER;
  445.                               VAR Days           : INTEGER;
  446.                               VAR Months         : INTEGER;
  447.                               VAR Years          : INTEGER   );
  448.  
  449. {--Packed DateTime Structure--}
  450.  
  451. Function  IncPDT(                 PDT            : LONGINT   ) : LONGINT;
  452.  
  453. Function  DecPDT(                 PDT            : LONGINT   ) : LONGINT;
  454.  
  455. Function  AddPDT(                 PDT            : LONGINT;
  456.                                   Hours          : WORD;
  457.                                   Minutes        : WORD;
  458.                                   Seconds        : WORD;
  459.                                   Days           : WORD;
  460.                                   Months         : WORD;
  461.                                   Years          : WORD      ) : LONGINT;
  462.  
  463. Function  SubPDT(                 PDT            : LONGINT;
  464.                                   Hours          : WORD;
  465.                                   Minutes        : WORD;
  466.                                   Seconds        : WORD;
  467.                                   Days           : WORD;
  468.                                   Months         : WORD;
  469.                                   Years          : WORD      ) : LONGINT;
  470.  
  471. Procedure PDTDiff(                PDT1           : LONGINT;
  472.                                   PDT2           : LONGINT;
  473.                               VAR Hours          : INTEGER;
  474.                               VAR Minutes        : INTEGER;
  475.                               VAR Seconds        : INTEGER;
  476.                               VAR Days           : INTEGER;
  477.                               VAR Months         : INTEGER;
  478.                               VAR Years          : INTEGER   );
  479.  
  480.  
  481.  
  482. {-------------------------------}
  483. { Floating Point Time Functions }
  484. {-------------------------------}
  485.  
  486. Function  CurrSeconds                                          : REAL;
  487.  
  488. Function  MarkTime                                             : REAL;
  489.  
  490. Procedure ClockOn;
  491.  
  492. Function  ClockOff                                             : REAL;
  493.  
  494. Function  ClockOffStr                                          : STRING;
  495.  
  496. Procedure DisplayStopWatch(       TimeDelta      : REAL      );
  497.  
  498. {------------------------}
  499. { System Clock Functions }
  500. {------------------------}
  501.  
  502. Function SetTicksSinceMidnt(      Ticks          : LONGINT   ) : BOOLEAN;
  503.  
  504. Function GetTicksSinceMidnt(  Var Days           : BYTE      ) : LONGINT;
  505.  
  506.  
  507. Function SetSysTime(              BcdHours       : BYTE;
  508.                                   BcdMins        : BYTE;
  509.                                   BcdSecs        : BYTE;
  510.                                   DSTActive      : BOOLEAN   ) : BOOLEAN;
  511.  
  512. Function GetSysTime(          Var BcdHours       : BYTE;
  513.                               Var BcdMins        : BYTE;
  514.                               Var BcdSecs        : BYTE;
  515.                               Var DSTActive      : BOOLEAN   ) : BOOLEAN;
  516.  
  517. Function SetSysDate(              BcdDay         : BYTE;
  518.                                   BcdMon         : BYTE;
  519.                                   BcdYear        : BYTE;
  520.                                   BcdCent        : BYTE      ) : BOOLEAN;
  521.  
  522. Function GetSysDate(          Var BcdDay         : BYTE;
  523.                               Var BcdMon         : BYTE;
  524.                               Var BcdYear        : BYTE;
  525.                               Var BcdCent        : BYTE      ) : BOOLEAN;
  526.  
  527. Function SetSysAlarmOn(           BcdHours       : BYTE;
  528.                                   BcdMins        : BYTE;
  529.                                   BcdSecs        : BYTE      ) : BOOLEAN;
  530.  
  531. Function SetSysAlarmOff                                        : BOOLEAN;
  532.  
  533.  
  534. {────────────────────────────────────────────────────────────────────────────}
  535.  
  536.  
  537. ──────────────────────────────────────────────────────────────────────────────
  538.  
  539.  
  540. [FUNCTION]
  541.  
  542. Function DayOfWeek(               Date           : TDate     ) : INTEGER;
  543.  
  544. [PARAMETERS]
  545.  
  546. Date        Source Date
  547.  
  548. [RETURNS]
  549.  
  550. Day Index (0=Sunday)
  551.  
  552. [DESCRIPTION]
  553.  
  554. Returns the Day of the Week Number of the given Date.  The Days are
  555. Base Zero.  (ie. 0=Sunday).
  556.  
  557. This value can be used with the cDayStr Array as an index to the
  558. Day Text Name (ie. cDayStr[0] = 'Sunday').
  559.  
  560. [SEE-ALSO]
  561.  
  562. [EXAMPLE]
  563.  
  564.  
  565. ──────────────────────────────────────────────────────────────────────────────
  566.  
  567.  
  568. [FUNCTION]
  569.  
  570. Function LeapYear(                Year           : WORD      ) : BOOLEAN;
  571.  
  572. [PARAMETERS]
  573.  
  574. Year        Source Year
  575.  
  576. [RETURNS]
  577.  
  578. Whether the source Year is a Leap Year.
  579.  
  580. [DESCRIPTION]
  581.  
  582. Determines and Reports whether the source Year is a Leap Year.
  583.  
  584. [SEE-ALSO]
  585.  
  586. [EXAMPLE]
  587.  
  588.  
  589. ──────────────────────────────────────────────────────────────────────────────
  590.  
  591.  
  592. [FUNCTION]
  593.  
  594. Function LeapYearDays(            Year           : WORD      ) : INTEGER;
  595.  
  596. [PARAMETERS]
  597.  
  598. Year        Source Year
  599.  
  600. [RETURNS]
  601.  
  602. Number of Leap-Year Days in the Source Year
  603.  
  604. [DESCRIPTION]
  605.  
  606. Returns the Number of Days in this Year which are the result of Leap
  607. Year.  If this is Not a Leap Year the Value will be Zero.  If it is a
  608. Normal Leap Year the Normal Value will be 1, unless it also happens to
  609. be a Leap Century in which case it will be 2.
  610.  
  611. [SEE-ALSO]
  612.  
  613. [EXAMPLE]
  614.  
  615.  
  616. ──────────────────────────────────────────────────────────────────────────────
  617.  
  618.  
  619. [FUNCTION]
  620.  
  621. Function DaysInMonth(             Month          : WORD;
  622.                                   Year           : WORD      ) : INTEGER;
  623.  
  624. [PARAMETERS]
  625.  
  626. Month       Source Month
  627. Year        Source Year
  628.  
  629. [RETURNS]
  630.  
  631. Number of Days in the Source Month.
  632.  
  633. [DESCRIPTION]
  634.  
  635. Based upon the provided Month and Year, returns the number of days that
  636. are in that month.  This takes into account Leap Year Days for Feberuary.
  637.  
  638. [SEE-ALSO]
  639.  
  640. [EXAMPLE]
  641.  
  642.  
  643. ──────────────────────────────────────────────────────────────────────────────
  644.  
  645.  
  646. [FUNCTION]
  647.  
  648. Function DayLightSavings(         Date           : TDate;
  649.                                   Hour           : WORD;
  650.                                   NoSupport      : BOOLEAN   ) : INTEGER;
  651.  
  652. [PARAMETERS]
  653.  
  654. Date        Source Date
  655. Hour        Source Hour
  656. NoSupport   Does your Area Support DayLight Savings? (TRUE=Yes)
  657.  
  658. [RETURNS]
  659.  
  660. Number of DayLight Savings Hours in this Hour
  661.  
  662. [DESCRIPTION]
  663.  
  664. Per an Act of Congress of 1986, the Spring Change Day was set to be
  665. the 1st Sunday in April with the Fall Change Day being the the last
  666. Sunday in October.  Prior to this the Spring Change Day was the last
  667. Sunday in April.
  668.  
  669. Per this Act, individual states and areas were free to elect to use
  670. DayLight Savings or not.  Some of the areas which have Elected not to
  671. are Arizona, Hawaii, Peurto Rico, the Virgin Islands, the American
  672. Samoas, and part of the following States: Indiana, Kansas, Texas,
  673. Florida, Michigan, and Alaska.  In order to support these difficult to
  674. compute areas, set the NoSupport Flag to FALSE, otherwise DLS will be
  675. computed down to the overall state level.
  676.  
  677. [SEE-ALSO]
  678.  
  679. [EXAMPLE]
  680.  
  681.  
  682. ──────────────────────────────────────────────────────────────────────────────
  683.  
  684.  
  685. [FUNCTION]
  686.  
  687. Function TimePM(                  Time           : TTime     ) : BOOLEAN;
  688.  
  689. [PARAMETERS]
  690.  
  691. Time        Source Time
  692.  
  693. [RETURNS]
  694.  
  695. Whether the Source Time is Post Meridian [PM]  (TRUE=Yes)
  696.  
  697. [DESCRIPTION]
  698.  
  699. Returns whether the source time is AM or PM.  If it is PM the function
  700. reports TRUE, else AM=FALSE.
  701.  
  702. [SEE-ALSO]
  703.  
  704. [EXAMPLE]
  705.  
  706.  
  707. ──────────────────────────────────────────────────────────────────────────────
  708.  
  709.  
  710. [FUNCTION]
  711.  
  712. Function ValidTime(               Hrs            : WORD;
  713.                                   Mins           : WORD;
  714.                                   Secs           : WORD      ) : BOOLEAN;
  715.  
  716. [PARAMETERS]
  717.  
  718. Hrs         Source Hours
  719. Mins        Source Minutes
  720. Secs        Source Seconds
  721.  
  722. [RETURNS]
  723.  
  724. Whether this Time is Valid (TRUE=Valid)
  725.  
  726. [DESCRIPTION]
  727.  
  728. Reports whether the Source Times represent a Valid Time.
  729. (ie. all values are within proper range)
  730.  
  731. [SEE-ALSO]
  732.  
  733. [EXAMPLE]
  734.  
  735.  
  736. ──────────────────────────────────────────────────────────────────────────────
  737.  
  738.  
  739. [FUNCTION]
  740.  
  741. Function ValidTimeMap(            Hrs            : WORD;
  742.                                   Mins           : WORD;
  743.                                   Secs           : WORD      ) : BYTE;
  744.  
  745. [PARAMETERS]
  746.  
  747. Hrs         Source Hours
  748. Mins        Source Minutes
  749. Secs        Source Seconds
  750.  
  751. [RETURNS]
  752.  
  753. BitMap of Invalid Time Field Elements
  754.  
  755. [DESCRIPTION]
  756.  
  757. Returns a Byte Bit-Map of any Invalid Fields in the given Time.
  758. Any Bits set to 1 Represent an Invalid Element.  Zero (0) represents
  759. a Valid Field Element.
  760.  
  761. This allows the caller to immediately identify what about the Time
  762. is invalid rather than just the whole thing.
  763.  
  764. The Bit-Map is as Follows: Bits
  765.                            ----
  766.                             7-3 - Not Used
  767.                             2   - Hours
  768.                             1   - Minutes
  769.                             0   - Seconds
  770.  
  771. [SEE-ALSO]
  772.  
  773. [EXAMPLE]
  774.  
  775.  
  776. ──────────────────────────────────────────────────────────────────────────────
  777.  
  778.  
  779. [FUNCTION]
  780.  
  781. Function ValidDate(               Days           : WORD;
  782.                                   Mons           : WORD;
  783.                                   Yrs            : WORD      ) : BOOLEAN;
  784.  
  785. [PARAMETERS]
  786.  
  787. Days        Source Day
  788. Mons        Source Month
  789. Yrs         Source Year
  790.  
  791. [RETURNS]
  792.  
  793. Whether the given Date is Valid (TRUE=Valid)
  794.  
  795. [DESCRIPTION]
  796.  
  797. Reports whether the Source Date represents a Valid Date.
  798. (ie. all values are within proper range)
  799.  
  800. [SEE-ALSO]
  801.  
  802. [EXAMPLE]
  803.  
  804.  
  805. ──────────────────────────────────────────────────────────────────────────────
  806.  
  807.  
  808. [FUNCTION]
  809.  
  810. Function ValidDateTime(           Hours          : WORD;
  811.                                   Minutes        : WORD;
  812.                                   Seconds        : WORD;
  813.                                   Days           : WORD;
  814.                                   Months         : WORD;
  815.                                   Year           : WORD      ) : BOOLEAN;
  816. [PARAMETERS]
  817.  
  818. Hours       Source Hour
  819. Minutes     Source Minute
  820. Seconds     Source Second
  821. Days        Source Day
  822. Months      Source Month
  823. Years       Source Year
  824.  
  825. [RETURNS]
  826.  
  827. Whether the given Date/Time is Valid (TRUE=Valid)
  828.  
  829. [DESCRIPTION]
  830.  
  831. Reports whether the Source Date/Time represents a Valid Date/Time.
  832. (ie. all values are within proper range)
  833.  
  834. [SEE-ALSO]
  835.  
  836. [EXAMPLE]
  837.  
  838.  
  839. ──────────────────────────────────────────────────────────────────────────────
  840.  
  841.  
  842. [FUNCTION]
  843.  
  844. Function ValidDateMap(            Days           : WORD;
  845.                                   Mons           : WORD;
  846.                                   Yrs            : WORD      ) : BYTE;
  847.  
  848. [PARAMETERS]
  849.  
  850. [RETURNS]
  851.  
  852. BitMap of Invalid Time Field Elements
  853.  
  854. [DESCRIPTION]
  855.  
  856. Returns a Byte Bit-Map of any Invalid Fields in the given Date.
  857. Any Bits set to 1 Represent an Invalid Element.  Zero (0) represents
  858. a Valid Field Element.
  859.  
  860. This allows the caller to immediately identify what about the Date
  861. is invalid rather than just the whole thing.
  862.  
  863. The Bit-Map is as Follows: Bits
  864.                            ----
  865.                             7-3 - Not Used
  866.                             2   - Days
  867.                             1   - Months
  868.                             0   - Years
  869.  
  870. [SEE-ALSO]
  871.  
  872. [EXAMPLE]
  873.  
  874.  
  875. ──────────────────────────────────────────────────────────────────────────────
  876.  
  877.  
  878. [FUNCTION]
  879.  
  880. Function ValidDT(                 DT             : TDateTime ) : BOOLEAN;
  881.  
  882. [PARAMETERS]
  883.  
  884. DT          Source Dos Date/Time Structure
  885.  
  886. [RETURNS]
  887.  
  888. Whether the given Date/Time is Valid (TRUE=Valid)
  889.  
  890. [DESCRIPTION]
  891.  
  892. Reports whether the Source Date/Time represents a Valid Date/Time.
  893. (ie. all values are within proper range)
  894.  
  895. [SEE-ALSO]
  896.  
  897. [EXAMPLE]
  898.  
  899.  
  900. ──────────────────────────────────────────────────────────────────────────────
  901.  
  902.  
  903. [FUNCTION]
  904.  
  905. Function ValidPDT(                PDT            : LONGINT   ) : BOOLEAN;
  906.  
  907. [PARAMETERS]
  908.  
  909. PDT         Source Packed Date/Time Value
  910.  
  911. [RETURNS]
  912.  
  913. Whether the given Date/Time is Valid (TRUE=Valid)
  914.  
  915. [DESCRIPTION]
  916.  
  917. Reports whether the Source Date/Time represents a Valid Date/Time.
  918. (ie. all values are within proper range)
  919.  
  920. [SEE-ALSO]
  921.  
  922. [EXAMPLE]
  923.  
  924.  
  925. ──────────────────────────────────────────────────────────────────────────────
  926.  
  927.  
  928. [FUNCTION]
  929.  
  930. Function CurrTime                                              : TTime;
  931.  
  932. [PARAMETERS]
  933.  
  934. (None)
  935.  
  936. [RETURNS]
  937.  
  938. The Current Time
  939.  
  940. [DESCRIPTION]
  941.  
  942. Gets the Current Time, Converts this to a TTime Value, and returns the
  943. result.
  944.  
  945. [SEE-ALSO]
  946.  
  947. [EXAMPLE]
  948.  
  949.  
  950. ──────────────────────────────────────────────────────────────────────────────
  951.  
  952.  
  953. [FUNCTION]
  954.  
  955. Function CurrDate                                              : TDate;
  956.  
  957. [PARAMETERS]
  958.  
  959. (None)
  960.  
  961. [RETURNS]
  962.  
  963. The Current Date
  964.  
  965. [DESCRIPTION]
  966.  
  967. Gets the Current Date, Converts this to a TDate Value, and returns the
  968. result.
  969.  
  970. [SEE-ALSO]
  971.  
  972. [EXAMPLE]
  973.  
  974.  
  975. ──────────────────────────────────────────────────────────────────────────────
  976.  
  977.  
  978. [FUNCTION]
  979.  
  980. Function CurrDTime                                          : TDTime;
  981.  
  982. [PARAMETERS]
  983.  
  984. (None)
  985.  
  986. [RETURNS]
  987.  
  988. The Current Date/Time
  989.  
  990. [DESCRIPTION]
  991.  
  992. Gets the Current Date & Time, Converts this to a TDateTime Value, and
  993. returns the result.
  994.  
  995. [SEE-ALSO]
  996.  
  997. [EXAMPLE]
  998.  
  999.  
  1000. ──────────────────────────────────────────────────────────────────────────────
  1001.  
  1002.  
  1003. [FUNCTION]
  1004.  
  1005. Procedure CurrDT(             Var DT             : DateTime  );
  1006.  
  1007. [PARAMETERS]
  1008.  
  1009. DT          VAR Returned Dos Date/Time Structure
  1010.  
  1011. [RETURNS]
  1012.  
  1013. Function : None
  1014. (VAR     : [DT] Dos Date/Time Structure)
  1015.  
  1016. [DESCRIPTION]
  1017.  
  1018. Gets the Current Date & Time, Converts this to a Dos Date/Time Structure,
  1019. and returns the result.
  1020.  
  1021. [SEE-ALSO]
  1022.  
  1023. [EXAMPLE]
  1024.  
  1025.  
  1026. ──────────────────────────────────────────────────────────────────────────────
  1027.  
  1028.  
  1029. [FUNCTION]
  1030.  
  1031. Function CurrPDT                                             : LONGINT;
  1032.  
  1033. [PARAMETERS]
  1034.  
  1035. (None)
  1036.  
  1037. [RETURNS]
  1038.  
  1039. Packed Date/Time Value
  1040.  
  1041. [DESCRIPTION]
  1042.  
  1043. Gets the Current Date & Time, Converts this to a Packed Date/Time Value,
  1044. and returns the result.
  1045.  
  1046. [SEE-ALSO]
  1047.  
  1048. [EXAMPLE]
  1049.  
  1050.  
  1051. ──────────────────────────────────────────────────────────────────────────────
  1052.  
  1053.  
  1054. [FUNCTION]
  1055.  
  1056. Function CurrDay                                               : TDay;
  1057.  
  1058. [PARAMETERS]
  1059.  
  1060. (None)
  1061.  
  1062. [RETURNS]
  1063.  
  1064. Current Day of the Week (0=Sunday)
  1065.  
  1066. [DESCRIPTION]
  1067.  
  1068. Returns the Day of the Week Number of the given Date.  The Days are
  1069. Base Zero.  (ie. 0=Sunday).
  1070.  
  1071. This value can be used with the cDayStr Array as an index to the
  1072. Day Text Name (ie. cDayStr[0] = 'Sunday').
  1073.  
  1074. [SEE-ALSO]
  1075.  
  1076. [EXAMPLE]
  1077.  
  1078.  
  1079. ──────────────────────────────────────────────────────────────────────────────
  1080.  
  1081.  
  1082. [FUNCTION]
  1083.  
  1084. Function HMSToTime(               Hrs            : WORD;
  1085.                                   Mins           : WORD;
  1086.                                   Secs           : WORD      ) : TTime;
  1087.  
  1088. [PARAMETERS]
  1089.  
  1090. Hrs         Source Hour
  1091. Mins        Source Minute
  1092. Secs        Source Second
  1093.  
  1094. [RETURNS]
  1095.  
  1096. Time Value from H:M:S
  1097.  
  1098. [DESCRIPTION]
  1099.  
  1100. Converts Hours/Minutes/Seconds into a Time Value
  1101.  
  1102. [SEE-ALSO]
  1103.  
  1104. [EXAMPLE]
  1105.  
  1106.  
  1107. ──────────────────────────────────────────────────────────────────────────────
  1108.  
  1109.  
  1110. [FUNCTION]
  1111.  
  1112. Procedure TimeToHMS(              Time           : TTime;
  1113.                               VAR Hrs            : INTEGER;
  1114.                               VAR Mins           : INTEGER;
  1115.                               VAR Secs           : INTEGER   );
  1116.  
  1117. [PARAMETERS]
  1118.  
  1119. Time        Source Time Value
  1120. Hrs         VAR Returned Hours
  1121. Mins        VAR Returned Minutes
  1122. Secs        VAR Returned Seconds
  1123.  
  1124. [RETURNS]
  1125.  
  1126. Function : None
  1127. (VAR     : [Hrs] Hours)
  1128. (VAR     : [Mins] Minutes)
  1129. (VAR     : [Secs] Seconds)
  1130.  
  1131. [DESCRIPTION]
  1132.  
  1133. Converts a Time Value into Hours/Minutes/Seconds.
  1134.  
  1135. [SEE-ALSO]
  1136.  
  1137. [EXAMPLE]
  1138.  
  1139.  
  1140. ──────────────────────────────────────────────────────────────────────────────
  1141.  
  1142.  
  1143. [FUNCTION]
  1144.  
  1145. Function DMYToDate(               Days           : WORD;
  1146.                                   Mons           : WORD;
  1147.                                   Yrs            : WORD      ) : TDate;
  1148.  
  1149. [PARAMETERS]
  1150.  
  1151. Days        Source Day
  1152. Mons        Source Month
  1153. Yrs         Source Year
  1154.  
  1155. [RETURNS]
  1156.  
  1157. Date Value from D/M/Y
  1158.  
  1159. [DESCRIPTION]
  1160.  
  1161. Converts Days/Months/Years into a Date Value.
  1162.  
  1163. [SEE-ALSO]
  1164.  
  1165. [EXAMPLE]
  1166.  
  1167.  
  1168. ──────────────────────────────────────────────────────────────────────────────
  1169.  
  1170.  
  1171. [FUNCTION]
  1172.  
  1173. Procedure DateToDMY(              Date           : TDate;
  1174.                               VAR Days           : INTEGER;
  1175.                               VAR Mons           : INTEGER;
  1176.                               VAR Yrs            : INTEGER   );
  1177.  
  1178. [PARAMETERS]
  1179.  
  1180. Date        Source Date Value
  1181. Days        VAR Returned Day
  1182. Mons        VAR Returned Month
  1183. Yrs         VAR Returned Year
  1184.  
  1185. [RETURNS]
  1186.  
  1187. Function : None
  1188. (VAR     : [Days] Day)
  1189. (VAR     : [Mons] Month)
  1190. (VAR     : [Yrs] Year)
  1191.  
  1192. [DESCRIPTION]
  1193.  
  1194. Converts a Date Value into Days/Months/Years.
  1195.  
  1196. [SEE-ALSO]
  1197.  
  1198. [EXAMPLE]
  1199.  
  1200.  
  1201. ──────────────────────────────────────────────────────────────────────────────
  1202.  
  1203.  
  1204. [FUNCTION]
  1205.  
  1206. Function ToDTime(                 Hours          : WORD;
  1207.                                   Minutes        : WORD;
  1208.                                   Seconds        : WORD;
  1209.                                   Days           : WORD;
  1210.                                   Months         : WORD;
  1211.                                   Years          : WORD      ) : TDTime;
  1212.  
  1213. [PARAMETERS]
  1214.  
  1215. Hours       Source Hour
  1216. Minutes     Source Minute
  1217. Seconds     Source Second
  1218. Days        Source Day
  1219. Months      Source Month
  1220. Years       Source Year
  1221.  
  1222. [RETURNS]
  1223.  
  1224. Date/Time Value from H:M:S & D/M/Y.
  1225.  
  1226. [DESCRIPTION]
  1227.  
  1228. Converts Hours/Minutes/Seconds and Days/Months/Years to a Date/Time Value.
  1229.  
  1230. [SEE-ALSO]
  1231.  
  1232. [EXAMPLE]
  1233.  
  1234.  
  1235. ──────────────────────────────────────────────────────────────────────────────
  1236.  
  1237.  
  1238. [FUNCTION]
  1239.  
  1240. Procedure FromDateTime(           DT        : TDateTime;
  1241.                               VAR Hours     : INTEGER;
  1242.                               VAR Minutes   : INTEGER;
  1243.                               VAR Seconds   : INTEGER;
  1244.                               VAR Day       : INTEGER;
  1245.                               VAR Month     : INTEGER;
  1246.                               VAR Year      : INTEGER      );
  1247.  
  1248. [PARAMETERS]
  1249.  
  1250. DT          Source Date/Time Value
  1251. Hours       VAR Returned Hour
  1252. Minutes     VAR Returned Minute
  1253. Seconds     VAR Returned Second
  1254. Day         VAR Returned Day
  1255. Month       VAR Returned Month
  1256. Year        VAR Returned Year
  1257.  
  1258. [RETURNS]
  1259.  
  1260. Function : None
  1261. (VAR     : [Hours] Hour)
  1262. (VAR     : [Minutes] Minute)
  1263. (VAR     : [Seconds] Second)
  1264. (VAR     : [Day] Day)
  1265. (VAR     : [Month] Month)
  1266. (VAR     : [Year] Year)
  1267.  
  1268. [DESCRIPTION]
  1269.  
  1270. Converts a Date/Time Value to Hour/Minute/Second & Day/Month/Year.
  1271.  
  1272. [SEE-ALSO]
  1273.  
  1274. [EXAMPLE]
  1275.  
  1276.  
  1277. ──────────────────────────────────────────────────────────────────────────────
  1278.  
  1279.  
  1280. [FUNCTION]
  1281.  
  1282. Procedure ToDT(               Var DT             : DateTime;
  1283.                                   Hours          : WORD;
  1284.                                   Minutes        : WORD;
  1285.                                   Seconds        : WORD;
  1286.                                   Days           : WORD;
  1287.                                   Months         : WORD;
  1288.                                   Years          : WORD      );
  1289.  
  1290. [PARAMETERS]
  1291.  
  1292. DT          VAR Returned Dos Date/Time Structure
  1293. Hours       Source Hour
  1294. Minutes     Source Minute
  1295. Seconds     Source Second
  1296. Days        Source Day
  1297. Months      Source Month
  1298. Years       Source Year
  1299.  
  1300. [RETURNS]
  1301.  
  1302. Function : None
  1303. (VAR     : [DT] Dos Date/Time Structure)
  1304.  
  1305. [DESCRIPTION]
  1306.  
  1307. Converts Hours/Minutes/Seconds & Days/Months/Years to Dos Date/Time
  1308. Structure.
  1309.  
  1310. [SEE-ALSO]
  1311.  
  1312. [EXAMPLE]
  1313.  
  1314.  
  1315. ──────────────────────────────────────────────────────────────────────────────
  1316.  
  1317.  
  1318. [FUNCTION]
  1319.  
  1320. Function DTtoLinear(              DT             : DateTime  ) : LONGINT;
  1321.  
  1322. [PARAMETERS]
  1323.  
  1324. DT          Source Dos Date/Time Structure
  1325.  
  1326. [RETURNS]
  1327.  
  1328. A Linear Julian Date/Time Value in Seconds.
  1329.  
  1330. [DESCRIPTION]
  1331.  
  1332. Converts a Dos Date/Time Structure
  1333.  
  1334. Note: This Date base can be changed from the Default Year of 1992 by
  1335. modifying the Variable "YearBase" (Type : WORD)
  1336.  
  1337. A Linear Date/Time is the date & time in seconds from a given base
  1338. of cYearBase.  Altering this Base allows the Date/Time Range to
  1339. be shifted to cover any years desired.  The Standard range is 130 Yrs.
  1340.  
  1341. [SEE-ALSO]
  1342.  
  1343. [EXAMPLE]
  1344.  
  1345.  
  1346. ──────────────────────────────────────────────────────────────────────────────
  1347.  
  1348.  
  1349. [FUNCTION]
  1350.  
  1351. Procedure LinearToDT(             L              : LONGINT;
  1352.                               Var DT             : DateTime  );
  1353.  
  1354. [PARAMETERS]
  1355.  
  1356. L           Source Linear Date/Time Value
  1357. DT          VAR Returned Dos Date/Time Structure
  1358.  
  1359. [RETURNS]
  1360.  
  1361. Function : None
  1362. (VAR     : [DT] Dos Date/Time Structure)
  1363.  
  1364. [DESCRIPTION]
  1365.  
  1366. Converts a Linear Date/Time Value into a Dos Date/Time Structure.
  1367.  
  1368. A Linear Date/Time is the date & time in seconds from a given base
  1369. of cYearBase.  Altering this Base allows the Date/Time Range to
  1370. be shifted to cover any years desired.  The Standard range is 130 Yrs.
  1371.  
  1372. [SEE-ALSO]
  1373.  
  1374. [EXAMPLE]
  1375.  
  1376.  
  1377. ──────────────────────────────────────────────────────────────────────────────
  1378.  
  1379.  
  1380. [FUNCTION]
  1381.  
  1382. Function  ToPDT(                  Hours          : WORD;
  1383.                                   Minutes        : WORD;
  1384.                                   Seconds        : WORD;
  1385.                                   Days           : WORD;
  1386.                                   Months         : WORD;
  1387.                                   Years          : WORD      ) : LONGINT;
  1388.  
  1389. [PARAMETERS]
  1390.  
  1391. Hours       Source Hour
  1392. Minutes     Source Minute
  1393. Seconds     Source Second
  1394. Days        Source Day
  1395. months      Source Month
  1396. Years       Source Year
  1397.  
  1398. [RETURNS]
  1399.  
  1400. A Packed Date/Time Value.
  1401.  
  1402. [DESCRIPTION]
  1403.  
  1404. Converts H:M:S & D/M/Y to a Packed Date/Time Value.
  1405.  
  1406. [SEE-ALSO]
  1407.  
  1408. [EXAMPLE]
  1409.  
  1410.  
  1411. ──────────────────────────────────────────────────────────────────────────────
  1412.  
  1413.  
  1414. [FUNCTION]
  1415.  
  1416. Procedure FromPDT(                PDT            : LONGINT;
  1417.                               VAR Hours          : INTEGER;
  1418.                               VAR Minutes        : INTEGER;
  1419.                               VAR Seconds        : INTEGER;
  1420.                               VAR Days           : INTEGER;
  1421.                               VAR Months         : INTEGER;
  1422.                               VAR Years          : INTEGER   );
  1423.  
  1424. [PARAMETERS]
  1425.  
  1426. PDT         Source Packed Date/Time Value
  1427. Hours       VAR Returned Hours
  1428. Minutes     VAR Returned Minutes
  1429. Seconds     VAR Returned Seconds
  1430. Days        VAR Returned Days
  1431. Months      VAR Returned Months
  1432. Years       VAR Returned Years
  1433.  
  1434. [RETURNS]
  1435.  
  1436. Function : None
  1437. (VAR     : [Hours] Hours)
  1438. (VAR     : [Minutes] Minutes)
  1439. (VAR     : [Seconds] Seconds)
  1440. (VAR     : [Days] Days)
  1441. (VAR     : [Months] Months)
  1442. (VAR     : [Years] Years)
  1443.  
  1444. [DESCRIPTION]
  1445.  
  1446. Converts a Packed Date/Time Value to H:M:S & D/M/Y.
  1447.  
  1448. [SEE-ALSO]
  1449.  
  1450. [EXAMPLE]
  1451.  
  1452.  
  1453. ──────────────────────────────────────────────────────────────────────────────
  1454.  
  1455.  
  1456. [FUNCTION]
  1457.  
  1458. Function  DTtoPDT(                DT             : DateTime  ) : LONGINT;
  1459.  
  1460. [PARAMETERS]
  1461.  
  1462. DT          Source Dos Date/Time Structure
  1463.  
  1464. [RETURNS]
  1465.  
  1466. Packed Date/Time Value
  1467.  
  1468. [DESCRIPTION]
  1469.  
  1470. Converts a Dos Date/Time Structure to a Packed Date/Time Value.
  1471.  
  1472. [SEE-ALSO]
  1473.  
  1474. [EXAMPLE]
  1475.  
  1476.  
  1477. ──────────────────────────────────────────────────────────────────────────────
  1478.  
  1479.  
  1480. [FUNCTION]
  1481.  
  1482. Procedure PDTtoDT(                PDT            : LONGINT;
  1483.                               VAR DT             : DateTime  );
  1484.  
  1485. [PARAMETERS]
  1486.  
  1487. PDT         Source Packed Date/Time Value
  1488. DT          VAR Returned Dos Date/Time Structure
  1489.  
  1490. [RETURNS]
  1491.  
  1492. Function : None
  1493. (VAR     : [DT] Dos Date/Time Structure)
  1494.  
  1495. [DESCRIPTION]
  1496.  
  1497. Converts a Packed Date/Time Value to a Dos Date/Time Structure.
  1498.  
  1499. [SEE-ALSO]
  1500.  
  1501. [EXAMPLE]
  1502.  
  1503.  
  1504. ──────────────────────────────────────────────────────────────────────────────
  1505.  
  1506.  
  1507. [FUNCTION]
  1508.  
  1509. Function DMYToDateZ(              Days           : WORD;
  1510.                                   Mons           : WORD;
  1511.                                   Yrs            : WORD      ) : TDate;
  1512.  
  1513. [PARAMETERS]
  1514.  
  1515. Days        Source Day
  1516. Mons        Source Month
  1517. Yrs         Source Year
  1518.  
  1519. [RETURNS]
  1520.  
  1521. A Zero-Based Date Value
  1522.  
  1523. [DESCRIPTION]
  1524.  
  1525. Converts D/M/Y to a Zero-Based Date Value.
  1526.  
  1527. NOTE : This is a Low-Level Routine used mainly for use in Date Diffenence
  1528. Routines.
  1529.  
  1530. [SEE-ALSO]
  1531.  
  1532. [EXAMPLE]
  1533.  
  1534.  
  1535. ──────────────────────────────────────────────────────────────────────────────
  1536.  
  1537.  
  1538. [FUNCTION]
  1539.  
  1540. Procedure DateZToDMY(             Date           : TDate;
  1541.                               VAR Days           : INTEGER;
  1542.                               VAR Mons           : INTEGER;
  1543.                               VAR Yrs            : INTEGER   );
  1544.  
  1545. [PARAMETERS]
  1546.  
  1547. Date        Source Date Value
  1548. Days        VAR Returned Day
  1549. Mons        VAR Returned Month
  1550. Yrs         VAR Returned Year
  1551.  
  1552. [RETURNS]
  1553.  
  1554. Function : None
  1555. (VAR     : [Days] Day)
  1556. (VAR     : [Mons] Month)
  1557. (VAR     : [Yrs] Year)
  1558.  
  1559. [DESCRIPTION]
  1560.  
  1561. Converts a Zero-Based Date Value to D/M/Y.
  1562.  
  1563. NOTE : This is a Low-Level Routine used mainly for use in Date Diffenence
  1564. Routines.
  1565.  
  1566. [SEE-ALSO]
  1567.  
  1568. [EXAMPLE]
  1569.  
  1570.  
  1571. ──────────────────────────────────────────────────────────────────────────────
  1572.  
  1573.  
  1574. [FUNCTION]
  1575.  
  1576. Function ToDTimeZ(                Hours          : WORD;
  1577.                                   Minutes        : WORD;
  1578.                                   Seconds        : WORD;
  1579.                                   Days           : WORD;
  1580.                                   Months         : WORD;
  1581.                                   Years          : WORD      ) : TDTime;
  1582.  
  1583. [PARAMETERS]
  1584.  
  1585. Hours       Source Hour
  1586. Minutes     Source Minute
  1587. Seconds     Source Second
  1588. Days        Source Day
  1589. Months      Source Month
  1590. Years       Source Year
  1591.  
  1592. [RETURNS]
  1593.  
  1594. A Zero-Based Date/Time Value
  1595.  
  1596. [DESCRIPTION]
  1597.  
  1598. Converts to Zero-Based Date/Time Value from H:M:S & D/M/Y.
  1599. Zero-Based Dates (IE 0/0/1992=1Jan1993)
  1600.  
  1601. Returns a Julian DateTime in seconds since midnight, 0/0/BaseYear (Default).
  1602. This Date can be changed by constant variable YearBase (Type: WORD)
  1603.  
  1604. NOTE : This is a Low-Level Routine used mainly for use in Date Diffenence
  1605. Routines.
  1606.  
  1607. [SEE-ALSO]
  1608.  
  1609. [EXAMPLE]
  1610.  
  1611.  
  1612. ──────────────────────────────────────────────────────────────────────────────
  1613.  
  1614.  
  1615. [FUNCTION]
  1616.  
  1617. Procedure FromDateTimeZ(          DT             : TDateTime;
  1618.                               VAR Hours          : INTEGER;
  1619.                               VAR Minutes        : INTEGER;
  1620.                               VAR Seconds        : INTEGER;
  1621.                               VAR Day            : INTEGER;
  1622.                               VAR Month          : INTEGER;
  1623.                               VAR Year           : INTEGER   );
  1624.  
  1625. [PARAMETERS]
  1626.  
  1627. DT          Source Zero-Based Date/Time Value
  1628. Hours       VAR Returned Hour
  1629. Minutes     VAR Returned Minute
  1630. Seconds     VAR Returned Second
  1631. Day         VAR Returned Day
  1632. Month       VAR Returned Month
  1633. Year        VAR Returned Year
  1634.  
  1635. [RETURNS]
  1636.  
  1637. Function : None
  1638. (VAR     : [Hours] Hour)
  1639. (VAR     : [Minutes] Minute)
  1640. (VAR     : [Seconds] Second)
  1641. (VAR     : [Day] Day)
  1642. (VAR     : [Month] Month)
  1643. (VAR     : [Year] Year)
  1644.  
  1645. [DESCRIPTION]
  1646.  
  1647. Converts a Zero-Based Date/Time Value to H:M:S & D/M/Y.
  1648. Zero-Based Dates (IE 0/0/1992=1Jan1993)
  1649.  
  1650. Returns a Julian DateTime in seconds since midnight, 0/0/BaseYear (Default).
  1651. This Date can be changed by constant variable YearBase (Type: WORD)
  1652.  
  1653. NOTE : This is a Low-Level Routine used mainly for use in Date Diffenence
  1654. Routines.
  1655.  
  1656. [SEE-ALSO]
  1657.  
  1658. [EXAMPLE]
  1659.  
  1660.  
  1661. ──────────────────────────────────────────────────────────────────────────────
  1662.  
  1663.  
  1664. [FUNCTION]
  1665.  
  1666. Function DTZtoLinear(             DT             : TDateTime ) : LONGINT;
  1667.  
  1668. [PARAMETERS]
  1669.  
  1670. DT          Source Zero-Based Dos Date/Time Structure
  1671.  
  1672. [RETURNS]
  1673.  
  1674. Zero-Based Linear Date/Time Value
  1675.  
  1676. [DESCRIPTION]
  1677.  
  1678. Converts a Zero-Based Dos Date/Time Structure to a Linear Date/Time Value.
  1679. Zero-Based Dates (IE 0/0/1992=1Jan1993)
  1680.  
  1681. Returns a Julian DateTime in seconds since midnight, 0/0/BaseYear (Default).
  1682. This Date can be changed by constant variable YearBase (Type: WORD)
  1683.  
  1684. NOTE : This is a Low-Level Routine used mainly for use in Date Diffenence
  1685. Routines.
  1686.  
  1687. [SEE-ALSO]
  1688.  
  1689. [EXAMPLE]
  1690.  
  1691.  
  1692. ──────────────────────────────────────────────────────────────────────────────
  1693.  
  1694.  
  1695. [FUNCTION]
  1696.  
  1697. Procedure LinearToDTZ(            L              : LONGINT;
  1698.                               Var DT             : TDateTime );
  1699.  
  1700. [PARAMETERS]
  1701.  
  1702. L           Source Linear Date/Time Value
  1703. DT          VAR Returned Zero-Based Date/Time Structure
  1704.  
  1705. [RETURNS]
  1706.  
  1707. Function : None
  1708. (VAR     : [DT] Zero-Based Date/Time Structure)
  1709.  
  1710. [DESCRIPTION]
  1711.  
  1712. Converts a Linear Date/Time Value to a Zero-Based Dos Date/Time Structure
  1713. Zero-Based Dates (IE 0/0/1992=1Jan1993)
  1714.  
  1715. Returns a Julian DateTime in seconds since midnight, 0/0/BaseYear (Default).
  1716. This Date can be changed by constant variable YearBase (Type: WORD)
  1717.  
  1718. NOTE : This is a Low-Level Routine used mainly for use in Date Difference
  1719. Routines.
  1720.  
  1721. [SEE-ALSO]
  1722.  
  1723. [EXAMPLE]
  1724.  
  1725.  
  1726. ──────────────────────────────────────────────────────────────────────────────
  1727.  
  1728.  
  1729. [FUNCTION]
  1730.  
  1731. Function TimeToStr(               Time           : TTime     ) : STRING;
  1732.  
  1733. [PARAMETERS]
  1734.  
  1735. Time        Source Time Value
  1736.  
  1737. [RETURNS]
  1738.  
  1739. String Representaion of Time (24-hr Mode)
  1740.  
  1741. [DESCRIPTION]
  1742.  
  1743. String Formatted as follows : "HH:MM:SS".
  1744. [SEE-ALSO]
  1745.  
  1746. [EXAMPLE]
  1747.  
  1748.  
  1749. ──────────────────────────────────────────────────────────────────────────────
  1750.  
  1751.  
  1752. [FUNCTION]
  1753.  
  1754. Function TimeToStrPM(             Time           : TTime     ) : STRING;
  1755.  
  1756. [PARAMETERS]
  1757.  
  1758. Time        Source Time Value
  1759.  
  1760. [RETURNS]
  1761.  
  1762. String Representation of Time as AM or PM (12-Hr Mode)
  1763.  
  1764. [DESCRIPTION]
  1765.  
  1766. String Formatted as follows : "HH:MM:SSPM".
  1767.  
  1768. Time wraps around every 12 Hours as either AM or PM.
  1769.  
  1770. [SEE-ALSO]
  1771.  
  1772. [EXAMPLE]
  1773.  
  1774.  
  1775. ──────────────────────────────────────────────────────────────────────────────
  1776.  
  1777.  
  1778. [FUNCTION]
  1779.  
  1780. Function TimeToStrHM(             Time           : TTime     ) : STRING;
  1781.  
  1782. [PARAMETERS]
  1783.  
  1784. Time        Source Time Value
  1785.  
  1786. [RETURNS]
  1787.  
  1788. String Representation of Time (24-Hr Mode)
  1789.  
  1790. [DESCRIPTION]
  1791.  
  1792. String Formatted as follows : "HH:MM"
  1793.  
  1794. [SEE-ALSO]
  1795.  
  1796. [EXAMPLE]
  1797.  
  1798.  
  1799. ──────────────────────────────────────────────────────────────────────────────
  1800.  
  1801.  
  1802. [FUNCTION]
  1803.  
  1804. Function DateToStr(               Date           : TDate     ) : STRING;
  1805.  
  1806. [PARAMETERS]
  1807.  
  1808. Date        Source Date Value
  1809.  
  1810. [RETURNS]
  1811.  
  1812. String Representation of Date
  1813.  
  1814. [DESCRIPTION]
  1815.  
  1816. String Formatted as follow : "DDMMMYY".  (ie. "24Jan92" )
  1817.  
  1818. [SEE-ALSO]
  1819.  
  1820. [EXAMPLE]
  1821.  
  1822.  
  1823. ──────────────────────────────────────────────────────────────────────────────
  1824.  
  1825.  
  1826. [FUNCTION]
  1827.  
  1828. Function DateToStrMDY(            Date           : TDate     ) : STRING;
  1829.  
  1830. [PARAMETERS]
  1831.  
  1832. Date        Source Date Value
  1833.  
  1834. [RETURNS]
  1835.  
  1836. String Representation of Date
  1837.  
  1838. [DESCRIPTION]
  1839.  
  1840. String Formatted as follows : "MM/DD/YY".
  1841.  
  1842. [SEE-ALSO]
  1843.  
  1844. [EXAMPLE]
  1845.  
  1846.  
  1847. ──────────────────────────────────────────────────────────────────────────────
  1848.  
  1849.  
  1850. [FUNCTION]
  1851.  
  1852. Function DateToStrDMY(            Date           : TDate     ) : STRING;
  1853.  
  1854. [PARAMETERS]
  1855.  
  1856. Date        Source Date Value
  1857.  
  1858. [RETURNS]
  1859.  
  1860. String Representation of Date
  1861.  
  1862. [DESCRIPTION]
  1863.  
  1864. String Formatted as follows : "DD/MM/YY".
  1865.  
  1866. [SEE-ALSO]
  1867.  
  1868. [EXAMPLE]
  1869.  
  1870.  
  1871. ──────────────────────────────────────────────────────────────────────────────
  1872.  
  1873.  
  1874. [FUNCTION]
  1875.  
  1876. Function  DateToStrDay(           Date           : TDate     ) : STRING;
  1877.  
  1878. [PARAMETERS]
  1879.  
  1880. Date        Source Date Value
  1881.  
  1882. [RETURNS]
  1883.  
  1884. String Representation of Date with Day of the Week
  1885.  
  1886. [DESCRIPTION]
  1887.  
  1888. String Formatted as follows : "DOW  MON DAY, YEAR".
  1889. (ie. "Thu  Mar 18, 1993" )
  1890.  
  1891. [SEE-ALSO]
  1892.  
  1893. [EXAMPLE]
  1894.  
  1895.  
  1896. ──────────────────────────────────────────────────────────────────────────────
  1897.  
  1898.  
  1899. [FUNCTION]
  1900.  
  1901. Function DTimeToStr(              DT             : TDTime    ) : STRING;
  1902.  
  1903. [PARAMETERS]
  1904.  
  1905. DT          Source Date/Time Value
  1906.  
  1907. [RETURNS]
  1908.  
  1909. String Representation of Date/Time
  1910.  
  1911. [DESCRIPTION]
  1912.  
  1913. String Formatted as follows : "HH:MM:SSPM DDMMMYY".
  1914. (ie. " 2:32:45PM 18Mar93" ).
  1915.  
  1916. [SEE-ALSO]
  1917.  
  1918. [EXAMPLE]
  1919.  
  1920.  
  1921. ──────────────────────────────────────────────────────────────────────────────
  1922.  
  1923.  
  1924. [FUNCTION]
  1925.  
  1926. Function DTimeToStrMDY(           DT             : TDTime    ) : STRING;
  1927.  
  1928. [PARAMETERS]
  1929.  
  1930. DT          Source Date/Time Value
  1931.  
  1932. [RETURNS]
  1933.  
  1934. String Representation of Date/Time
  1935.  
  1936. [DESCRIPTION]
  1937.  
  1938. String Formatted as follows : "HH:MM:SS MM/DD/YY"
  1939.  
  1940. [SEE-ALSO]
  1941.  
  1942. [EXAMPLE]
  1943.  
  1944.  
  1945. ──────────────────────────────────────────────────────────────────────────────
  1946.  
  1947.  
  1948. [FUNCTION]
  1949.  
  1950. Function DTimeToStrDMY(           DT             : TDTime ) : STRING;
  1951.  
  1952. [PARAMETERS]
  1953.  
  1954. DT          Source Date/Time Value
  1955.  
  1956. [RETURNS]
  1957.  
  1958. String Representation of Date/Time
  1959.  
  1960. [DESCRIPTION]
  1961.  
  1962. String Formatted as follows : "HH:MM:SS DD/MM/YY".
  1963.  
  1964. [SEE-ALSO]
  1965.  
  1966. [EXAMPLE]
  1967.  
  1968.  
  1969. ──────────────────────────────────────────────────────────────────────────────
  1970.  
  1971.  
  1972. [FUNCTION]
  1973.  
  1974. Function DTtoStr(                 DT             : TDateTime ) : STRING;
  1975.  
  1976. [PARAMETERS]
  1977.  
  1978. DT          Source Date/Time Structure
  1979.  
  1980. [RETURNS]
  1981.  
  1982. String Representation of Date/Time
  1983.  
  1984. [DESCRIPTION]
  1985.  
  1986. String Formatted as follows : "HH:MM:SS DDMMMYY".
  1987. (ie. "14:32:45 18Mar93" )
  1988.  
  1989. [SEE-ALSO]
  1990.  
  1991. [EXAMPLE]
  1992.  
  1993.  
  1994. ──────────────────────────────────────────────────────────────────────────────
  1995.  
  1996.  
  1997. [FUNCTION]
  1998.  
  1999. Function DTtoStrMDY(              DT             : TDateTime ) : STRING;
  2000.  
  2001. [PARAMETERS]
  2002.  
  2003. DT          Source Date/Time Structure
  2004.  
  2005. [RETURNS]
  2006.  
  2007. String Representation of Date/Time
  2008.  
  2009. [DESCRIPTION]
  2010.  
  2011. String Formatted as follows : "MM/DD/YY HH:MM:SS".
  2012.  
  2013. [SEE-ALSO]
  2014.  
  2015. [EXAMPLE]
  2016.  
  2017.  
  2018. ──────────────────────────────────────────────────────────────────────────────
  2019.  
  2020.  
  2021. [FUNCTION]
  2022.  
  2023. Function DTtoStrDMY(              DT             : TDateTime ) : STRING;
  2024.  
  2025. [PARAMETERS]
  2026.  
  2027. DT          Source Date/Time Structure
  2028.  
  2029. [RETURNS]
  2030.  
  2031. String Representation of Date/Time
  2032.  
  2033. [DESCRIPTION]
  2034.  
  2035. String Formatted as follows : "MM/DD/YY HH:MM:SS".
  2036.  
  2037. [SEE-ALSO]
  2038.  
  2039. [EXAMPLE]
  2040.  
  2041.  
  2042. ──────────────────────────────────────────────────────────────────────────────
  2043.  
  2044.  
  2045. [FUNCTION]
  2046.  
  2047. Procedure StrToDT(                S              : STRING;
  2048.                               Var DT             : TDateTime );
  2049.  
  2050. [PARAMETERS]
  2051.  
  2052. S           Source Date/Time String as "MM/DD/YY HH:MM:SS" ONLY
  2053. DT          VAR Returned Date/Time Structure
  2054.  
  2055. [RETURNS]
  2056.  
  2057. Function : None
  2058. (VAR     : [DT] Date/Time Structure)
  2059.  
  2060. [DESCRIPTION]
  2061.  
  2062. Converts a Formatted Date/Time String into a Date/Time Structure.
  2063. Only Interprets string as "MM/DD/YY HH:MM:SS"
  2064.  
  2065. [SEE-ALSO]
  2066.  
  2067. [EXAMPLE]
  2068.  
  2069.  
  2070. ──────────────────────────────────────────────────────────────────────────────
  2071.  
  2072.  
  2073. [FUNCTION]
  2074.  
  2075. Function PDTtoStr(                PDT            : LONGINT   ) : STRING;
  2076.  
  2077. [PARAMETERS]
  2078.  
  2079. PDT         Source Packed Date/Time Structure
  2080.  
  2081. [RETURNS]
  2082.  
  2083. Formatted Date/Time String
  2084.  
  2085. [DESCRIPTION]
  2086.  
  2087. String Formatted as follows : "MM/DD/YY HH:MM:SS".
  2088. [SEE-ALSO]
  2089.  
  2090. [EXAMPLE]
  2091.  
  2092.  
  2093. ──────────────────────────────────────────────────────────────────────────────
  2094.  
  2095.  
  2096. [FUNCTION]
  2097.  
  2098. Function PDTtoStrMDY(             PDT            : LONGINT   ) : STRING;
  2099.  
  2100. [PARAMETERS]
  2101.  
  2102. PDT         Source Packed Date/Time Structure
  2103.  
  2104. [RETURNS]
  2105.  
  2106. Formatted Date/Time String
  2107.  
  2108. [DESCRIPTION]
  2109.  
  2110. String Formatted as follows : "MM/DD/YY HH:MM:SS".
  2111. [SEE-ALSO]
  2112.  
  2113. [EXAMPLE]
  2114.  
  2115.  
  2116. ──────────────────────────────────────────────────────────────────────────────
  2117.  
  2118.  
  2119. [FUNCTION]
  2120.  
  2121. Function PDTtoStrDMY(             PDT            : LONGINT   ) : STRING;
  2122.  
  2123. [PARAMETERS]
  2124.  
  2125. PDT         Source Packed Date/Time Structure
  2126.  
  2127. [RETURNS]
  2128.  
  2129. Formatted Date/Time String
  2130.  
  2131. [DESCRIPTION]
  2132.  
  2133. String formatted as follows : "MM/DD/YY HH:MM:SS".
  2134.  
  2135. [SEE-ALSO]
  2136.  
  2137. [EXAMPLE]
  2138.  
  2139.  
  2140. ──────────────────────────────────────────────────────────────────────────────
  2141.  
  2142.  
  2143. [FUNCTION]
  2144.  
  2145. Function IncTime(                 Time           : TTime     ) : TTime;
  2146.  
  2147. [PARAMETERS]
  2148.  
  2149. Time        Source Time Value
  2150.  
  2151. [RETURNS]
  2152.  
  2153. Incremented Time Value
  2154.  
  2155. [DESCRIPTION]
  2156.  
  2157. Increments the Time by One (1) Second.  The Time wraps every 24 Hours.
  2158.  
  2159. [SEE-ALSO]
  2160.  
  2161. [EXAMPLE]
  2162.  
  2163.  
  2164. ──────────────────────────────────────────────────────────────────────────────
  2165.  
  2166.  
  2167. [FUNCTION]
  2168.  
  2169. Function DecTime(                 Time           : TTime     ) : TTime;
  2170.  
  2171. [PARAMETERS]
  2172.  
  2173. Time        Source Time Value
  2174.  
  2175. [RETURNS]
  2176.  
  2177. Decremented Time Value
  2178.  
  2179. [DESCRIPTION]
  2180.  
  2181. Decrements the Time by One (1) Second.  The Time wraps every 24 Hours.
  2182.  
  2183. [SEE-ALSO]
  2184.  
  2185. [EXAMPLE]
  2186.  
  2187.  
  2188. ──────────────────────────────────────────────────────────────────────────────
  2189.  
  2190.  
  2191. [FUNCTION]
  2192.  
  2193. Function AddTime(            Time      : TTime;
  2194.                              Hrs       : WORD;
  2195.                              Mins      : WORD;
  2196.                              Secs      : WORD         ) : TTime;
  2197.  
  2198. [PARAMETERS]
  2199.  
  2200. Time        Source Time Value
  2201. Hrs         Hours to Add
  2202. Mins        Minutes to Add
  2203. Secs        Seconds to Add
  2204.  
  2205. [RETURNS]
  2206.  
  2207. Time Value with H:M:S Times Added.
  2208.  
  2209. [DESCRIPTION]
  2210.  
  2211. Time Value with H:M:S Times Added.
  2212.  
  2213. [SEE-ALSO]
  2214.  
  2215. [EXAMPLE]
  2216.  
  2217.  
  2218. ──────────────────────────────────────────────────────────────────────────────
  2219.  
  2220.  
  2221. [FUNCTION]
  2222.  
  2223. Function SubTime(                 Time           : TTime;
  2224.                                   Hrs            : WORD;
  2225.                                   Mins           : WORD;
  2226.                                   Secs           : WORD      ) : TTime;
  2227.  
  2228. [PARAMETERS]
  2229.  
  2230. Time        Source Time Value
  2231. Hrs         Hours to Subtract
  2232. Mins        Minutes to Subtract
  2233. Secs        Seconds to Subtract
  2234.  
  2235. [RETURNS]
  2236.  
  2237. Time Value with H:M:S Times Subtracted.
  2238.  
  2239. [DESCRIPTION]
  2240.  
  2241. Time Value with H:M:S Times Subtracted.
  2242.  
  2243. [SEE-ALSO]
  2244.  
  2245. [EXAMPLE]
  2246.  
  2247.  
  2248. ──────────────────────────────────────────────────────────────────────────────
  2249.  
  2250.  
  2251. [FUNCTION]
  2252.  
  2253. Procedure TimeDiff(               Time1          : TTime;
  2254.                                   Time2          : TTime;
  2255.                               VAR Hrs            : INTEGER;
  2256.                               VAR Mins           : INTEGER;
  2257.                               VAR Secs           : INTEGER   );
  2258.  
  2259. [PARAMETERS]
  2260.  
  2261. Time1       1st Source Time Value
  2262. Time2       2nd Source Time Value
  2263. Hrs         VAR Returned Hours Difference
  2264. Mins        VAR Returned Minutes Difference
  2265. Secs        VAR Returned Seconds Difference
  2266.  
  2267. [RETURNS]
  2268.  
  2269. Function : None
  2270. (VAR     : [Hrs] Hours Difference)
  2271. (VAR     : [Mins] Minutes Difference)
  2272. (VAR     : [Secs] Seconds Difference)
  2273.  
  2274. [DESCRIPTION]
  2275.  
  2276. Determines the Time Difference between the 1st Time and the 2nd Time
  2277. in terms of Hours/Minutes/Seconds.
  2278.  
  2279. NOTE : Time Difference values are always returned Positive.
  2280.  
  2281. [SEE-ALSO]
  2282.  
  2283. [EXAMPLE]
  2284.  
  2285.  
  2286. ──────────────────────────────────────────────────────────────────────────────
  2287.  
  2288.  
  2289. [FUNCTION]
  2290.  
  2291. Function IncDate(                 Date           : TDate     ) : TDate;
  2292.  
  2293. [PARAMETERS]
  2294.  
  2295. Date        Source Date Value
  2296.  
  2297. [RETURNS]
  2298.  
  2299. Incremented Date Value
  2300.  
  2301. [DESCRIPTION]
  2302.  
  2303. Increments the Date by One (1) Day.
  2304.  
  2305. [SEE-ALSO]
  2306.  
  2307. [EXAMPLE]
  2308.  
  2309.  
  2310. ──────────────────────────────────────────────────────────────────────────────
  2311.  
  2312.  
  2313. [FUNCTION]
  2314.  
  2315. Function DecDate(                 Date           : TDate     ) : TDate;
  2316.  
  2317. [PARAMETERS]
  2318.  
  2319. Date        Source Date Value
  2320.  
  2321. [RETURNS]
  2322.  
  2323. Decremented Date Value
  2324.  
  2325. [DESCRIPTION]
  2326.  
  2327. Decrements the Date by One (1) Day.
  2328.  
  2329. [SEE-ALSO]
  2330.  
  2331. [EXAMPLE]
  2332.  
  2333.  
  2334. ──────────────────────────────────────────────────────────────────────────────
  2335.  
  2336.  
  2337. [FUNCTION]
  2338.  
  2339. Function AddDate(                 Date           : TDate;
  2340.                                   Days           : WORD;
  2341.                                   Mons           : WORD;
  2342.                                   Yrs            : WORD      ) : TDate;
  2343.  
  2344. [PARAMETERS]
  2345.  
  2346. Date        Source Date Value
  2347. Days        Days to Add
  2348. Mons        Months to Add
  2349. Yrs         Years to Add
  2350.  
  2351. [RETURNS]
  2352.  
  2353. Date Value with M/D/Y Times Added.
  2354.  
  2355. [DESCRIPTION]
  2356.  
  2357. Date Value with M/D/Y Times Added.
  2358.  
  2359. [SEE-ALSO]
  2360.  
  2361. [EXAMPLE]
  2362.  
  2363.  
  2364. ──────────────────────────────────────────────────────────────────────────────
  2365.  
  2366.  
  2367. [FUNCTION]
  2368.  
  2369. Function SubDate(                 Date           : TDate;
  2370.                                   Days           : WORD;
  2371.                                   Mons           : WORD;
  2372.                                   Yrs            : WORD      ) : TDate;
  2373.  
  2374. [PARAMETERS]
  2375.  
  2376. Date        Source Date Value
  2377. Days        Days to Subtract
  2378. Mons        Months to Subtract
  2379. Yrs         Years to Subtract
  2380.  
  2381. [RETURNS]
  2382.  
  2383. Date Value with M/D/Y Times subtracted.
  2384.  
  2385. [DESCRIPTION]
  2386.  
  2387. Date Value with M/D/Y Times subtracted.
  2388.  
  2389.  
  2390. [SEE-ALSO]
  2391.  
  2392. [EXAMPLE]
  2393.  
  2394.  
  2395. ──────────────────────────────────────────────────────────────────────────────
  2396.  
  2397.  
  2398. [FUNCTION]
  2399.  
  2400. Procedure DateDiff(               Date1          : TDate;
  2401.                                   Date2          : TDate;
  2402.                               VAR Days           : INTEGER;
  2403.                               VAR Mons           : INTEGER;
  2404.                               VAR Yrs            : INTEGER   );
  2405.  
  2406. [PARAMETERS]
  2407.  
  2408. Date1       1st Source Packed Date
  2409. Date2       2nd Source Packed Date
  2410. Days        VAR Returned Days Difference
  2411. Mons        VAR Returned Months Difference
  2412. Yrs         VAR Returned Years Differnce
  2413.  
  2414. [RETURNS]
  2415.  
  2416. Function : None
  2417. (VAR     : [Days] Days Difference)
  2418. (VAR     : [Mons] Months Difference)
  2419. (VAR     : [Yrs] Years Differnce)
  2420.  
  2421. [DESCRIPTION]
  2422.  
  2423. Determines the Date Difference between the 1st Date and the 2nd Date
  2424. in terms of Days/Months/Years.
  2425.  
  2426. NOTE: Date Difference values are always returned Positive.
  2427.  
  2428. [SEE-ALSO]
  2429.  
  2430. [EXAMPLE]
  2431.  
  2432.  
  2433. ──────────────────────────────────────────────────────────────────────────────
  2434.  
  2435.  
  2436. [FUNCTION]
  2437.  
  2438. Function IncDTime(                DT             : TDTime    ) : TDTime;
  2439.  
  2440. [PARAMETERS]
  2441.  
  2442. DT          Source DateTime Value
  2443.  
  2444. [RETURNS]
  2445.  
  2446. Incremented DateTime Value
  2447.  
  2448. [DESCRIPTION]
  2449.  
  2450. Increments the DateTime Value by One (1) Second.
  2451.  
  2452. [SEE-ALSO]
  2453.  
  2454. [EXAMPLE]
  2455.  
  2456.  
  2457. ──────────────────────────────────────────────────────────────────────────────
  2458.  
  2459.  
  2460. [FUNCTION]
  2461.  
  2462. Function DecDTime(                DT             : TDTime ) : TDTime;
  2463.  
  2464. [PARAMETERS]
  2465.  
  2466. DT          Source Date/Time Value
  2467.  
  2468. [RETURNS]
  2469.  
  2470. Decremented Date/Time Value
  2471.  
  2472. [DESCRIPTION]
  2473.  
  2474. Decrements the Date/Time Value by One (1) Second.
  2475.  
  2476. [SEE-ALSO]
  2477.  
  2478. [EXAMPLE]
  2479.  
  2480.  
  2481. ──────────────────────────────────────────────────────────────────────────────
  2482.  
  2483.  
  2484. [FUNCTION]
  2485.  
  2486. Function AddDTime(                DT             : TDTime;
  2487.                                   Hours          : WORD;
  2488.                                   Minutes        : WORD;
  2489.                                   Seconds        : WORD;
  2490.                                   Days           : WORD;
  2491.                                   Months         : WORD;
  2492.                                   Years          : WORD      ) : TDTime;
  2493.  
  2494. [PARAMETERS]
  2495.  
  2496. DT1         Source Date/Time Value
  2497. Hours       Hours to Add
  2498. Minutes     Minutes to Add
  2499. Seconds     Seconds to Add
  2500. Days        Days to Add
  2501. Months      Months to Add
  2502. Years       Years to Add
  2503.  
  2504. [RETURNS]
  2505.  
  2506. DateTime value with Date/Time Added.
  2507.  
  2508. [DESCRIPTION]
  2509.  
  2510. [SEE-ALSO]
  2511.  
  2512. [EXAMPLE]
  2513.  
  2514.  
  2515. ──────────────────────────────────────────────────────────────────────────────
  2516.  
  2517.  
  2518. [FUNCTION]
  2519.  
  2520. Function SubDTime(                DT1            : TDTime;
  2521.                                   Hours          : WORD;
  2522.                                   Minutes        : WORD;
  2523.                                   Seconds        : WORD;
  2524.                                   Days           : WORD;
  2525.                                   Months         : WORD;
  2526.                                   Years          : WORD      ) : TDTime;
  2527.  
  2528. [PARAMETERS]
  2529.  
  2530. DT1         Source Date/Time Value
  2531. Hours       Hours to Subtract
  2532. Minutes     Minutes to Subtract
  2533. Seconds     Seconds to Subtract
  2534. Days        Days to Subtract
  2535. Months      Months to Subtract
  2536. Years       Years to Subtract
  2537.  
  2538. [RETURNS]
  2539.  
  2540. DateTime Value with Date/Time Subtracted.
  2541.  
  2542. [DESCRIPTION]
  2543.  
  2544. [SEE-ALSO]
  2545.  
  2546. [EXAMPLE]
  2547.  
  2548.  
  2549. ──────────────────────────────────────────────────────────────────────────────
  2550.  
  2551.  
  2552. [FUNCTION]
  2553.  
  2554. Procedure DTimeDiff(              DT1            : TDTime;
  2555.                                   DT2            : TDTime;
  2556.                               VAR Hours          : INTEGER;
  2557.                               VAR Minutes        : INTEGER;
  2558.                               VAR Seconds        : INTEGER;
  2559.                               VAR Days           : INTEGER;
  2560.                               VAR Months         : INTEGER;
  2561.                               VAR Years          : INTEGER   );
  2562.  
  2563. [PARAMETERS]
  2564.  
  2565. DT1         1st Source Date/Time Value
  2566. DT2         2nd Source Date/Time Value
  2567. Hours       VAR Returned Hours Diffence
  2568. Minutes     VAR Returned Minutes Difference
  2569. Seconds     VAR Returned Seconds Difference
  2570. Days        VAR Returned Days Difference
  2571. Months      VAR Returned Months Difference
  2572. Years       VAR Returned Years Difference
  2573.  
  2574. [RETURNS]
  2575.  
  2576. Function : None
  2577. (VAR     : [Hours] Hours Diffence)
  2578. (VAR     : [Minutes] Minutes Difference)
  2579. (VAR     : [Seconds] Seconds Difference)
  2580. (VAR     : [Days] Days Difference)
  2581. (VAR     : [Months] Months Difference)
  2582. (VAR     : [Years] Years Difference)
  2583.  
  2584. [DESCRIPTION]
  2585.  
  2586. Time Difference Values are always returned Positive.
  2587.  
  2588. [SEE-ALSO]
  2589.  
  2590. [EXAMPLE]
  2591.  
  2592.  
  2593. ──────────────────────────────────────────────────────────────────────────────
  2594.  
  2595.  
  2596. [FUNCTION]
  2597.  
  2598. Procedure IncDT(              Var DT             : TDateTime );
  2599.  
  2600. [PARAMETERS]
  2601.  
  2602. DT          VAR Modified Dos Date/Time Structure
  2603.  
  2604. [RETURNS]
  2605.  
  2606. (None)
  2607.  
  2608. [DESCRIPTION]
  2609.  
  2610. Incremented Date/Time
  2611.  
  2612. [SEE-ALSO]
  2613.  
  2614. [EXAMPLE]
  2615.  
  2616.  
  2617. ──────────────────────────────────────────────────────────────────────────────
  2618.  
  2619.  
  2620. [FUNCTION]
  2621.  
  2622. Procedure DecDT(              Var DT             : TDateTime );
  2623.  
  2624. [PARAMETERS]
  2625.  
  2626. DT          VAR Modified Source Dos Date/Time Structure
  2627.  
  2628. [RETURNS]
  2629.  
  2630. (None)
  2631.  
  2632. [DESCRIPTION]
  2633.  
  2634. Decremented Date/Time
  2635.  
  2636. [SEE-ALSO]
  2637.  
  2638. [EXAMPLE]
  2639.  
  2640.  
  2641. ──────────────────────────────────────────────────────────────────────────────
  2642.  
  2643.  
  2644. [FUNCTION]
  2645.  
  2646. Procedure AddDT(              Var DT             : TDateTime;
  2647.                                   Hours          : WORD;
  2648.                                   Minutes        : WORD;
  2649.                                   Seconds        : WORD;
  2650.                                   Days           : WORD;
  2651.                                   Months         : WORD;
  2652.                                   Years          : WORD      );
  2653.  
  2654. [PARAMETERS]
  2655.  
  2656. DT1         VAR Modified Source Packed Date/Time
  2657. Hours       Hours to Add
  2658. Minutes     Minutes to Add
  2659. Seconds     Seconds to Add
  2660. Days        Days to Add
  2661. Months      Months to Add
  2662. Years       Years to Add
  2663.  
  2664. [RETURNS]
  2665.  
  2666. Function : None
  2667. (VAR     : [DT1] Modified Source Packed Date/Time)
  2668.  
  2669. [DESCRIPTION]
  2670.  
  2671. Dos Date/Time with Provide Times Added
  2672.  
  2673. [SEE-ALSO]
  2674.  
  2675. [EXAMPLE]
  2676.  
  2677.  
  2678. ──────────────────────────────────────────────────────────────────────────────
  2679.  
  2680.  
  2681. [FUNCTION]
  2682.  
  2683. Procedure SubDT(              Var DT             : TDateTime;
  2684.                                   Hours          : WORD;
  2685.                                   Minutes        : WORD;
  2686.                                   Seconds        : WORD;
  2687.                                   Days           : WORD;
  2688.                                   Months         : WORD;
  2689.                                   Years          : WORD      );
  2690.  
  2691. [PARAMETERS]
  2692.  
  2693. DT          VAR Modified Source Dos Date/Time Structure
  2694. Hours       Hours to Subtract
  2695. Minutes     Minutes to Subtract
  2696. Seconds     Seconds to Subtract
  2697. Days        Days to Subtract
  2698. Months      Months to Subtract
  2699. Years       Years to Subtract
  2700.  
  2701. [RETURNS]
  2702.  
  2703. Function : None
  2704. (VAR     : [DT] Modified Source Dos Date/Time Structure)
  2705.  
  2706. [DESCRIPTION]
  2707.  
  2708. Dos Date/Time with Provided Times Subtracted
  2709.  
  2710. [SEE-ALSO]
  2711.  
  2712. [EXAMPLE]
  2713.  
  2714.  
  2715. ──────────────────────────────────────────────────────────────────────────────
  2716.  
  2717.  
  2718. [FUNCTION]
  2719.  
  2720. Procedure DTDiff(                 DT1            : TDateTime;
  2721.                                   DT2            : TDateTime;
  2722.                               VAR Hours          : INTEGER;
  2723.                               VAR Minutes        : INTEGER;
  2724.                               VAR Seconds        : INTEGER;
  2725.                               VAR Days           : INTEGER;
  2726.                               VAR Months         : INTEGER;
  2727.                               VAR Years          : INTEGER   );
  2728.  
  2729. [PARAMETERS]
  2730.  
  2731. DT1         1st Source Date/Time Structure
  2732. DT2         2nd Source Date/Time Structure
  2733. Hours       VAR Returned Hours Diffence
  2734. Minutes     VAR Returned Minutes Difference
  2735. Seconds     VAR Returned Seconds Difference
  2736. Days        VAR Returned Days Difference
  2737. Months      VAR Returned Months Difference
  2738. Years       VAR Returned Years Difference
  2739.  
  2740. [RETURNS]
  2741.  
  2742. Function : None
  2743. (VAR     : [Hours] Hours Diffence)
  2744. (VAR     : [Minutes] Minutes Difference)
  2745. (VAR     : [Seconds] Seconds Difference)
  2746. (VAR     : [Days] Days Difference)
  2747. (VAR     : [Months] Months Difference)
  2748. (VAR     : [Years] Years Difference)
  2749.  
  2750. [DESCRIPTION]
  2751.  
  2752. Time Difference Valued are always returned Positive.
  2753.  
  2754. [SEE-ALSO]
  2755.  
  2756. [EXAMPLE]
  2757.  
  2758.  
  2759. ──────────────────────────────────────────────────────────────────────────────
  2760.  
  2761.  
  2762. [FUNCTION]
  2763.  
  2764. Function  IncPDT(                 PDT            : LONGINT   ) : LONGINT;
  2765.  
  2766. [PARAMETERS]
  2767.  
  2768. PDT         Source Packed DateTime
  2769.  
  2770. [RETURNS]
  2771.  
  2772. Incremented Packed DateTime
  2773.  
  2774. [DESCRIPTION]
  2775.  
  2776. Increments the Time by Two (2) Seconds.
  2777.  
  2778. [SEE-ALSO]
  2779.  
  2780. [EXAMPLE]
  2781.  
  2782.  
  2783. ──────────────────────────────────────────────────────────────────────────────
  2784.  
  2785.  
  2786. [FUNCTION]
  2787.  
  2788. Function  DecPDT(                 PDT            : LONGINT   ) : LONGINT;
  2789.  
  2790. [PARAMETERS]
  2791.  
  2792. PDT         Source Packed DateTime
  2793.  
  2794. [RETURNS]
  2795.  
  2796. Decremented Packed DateTime
  2797.  
  2798. [DESCRIPTION]
  2799.  
  2800. Decrements the Time by Two (2) Seconds.
  2801.  
  2802. [SEE-ALSO]
  2803.  
  2804. [EXAMPLE]
  2805.  
  2806.  
  2807. ──────────────────────────────────────────────────────────────────────────────
  2808.  
  2809.  
  2810. [FUNCTION]
  2811.  
  2812. Function  AddPDT(                 PDT            : LONGINT;
  2813.                                   Hours          : WORD;
  2814.                                   Minutes        : WORD;
  2815.                                   Seconds        : WORD;
  2816.                                   Days           : WORD;
  2817.                                   Months         : WORD;
  2818.                                   Years          : WORD      ) : LONGINT;
  2819.  
  2820. [PARAMETERS]
  2821.  
  2822. PDT         Source Packed DateTime Structure
  2823. Hours       Hours to Add
  2824. Minutes     Minutes to Add
  2825. Seconds     Seconds to Add
  2826. Days        Days to Add
  2827. Months      Months to Add
  2828. Years       Years to Add
  2829.  
  2830. [RETURNS]
  2831.  
  2832. Value with Date/Time Added
  2833.  
  2834. [DESCRIPTION]
  2835.  
  2836. Note: Minimum Granularity is 2 Seconds.
  2837.  
  2838. [SEE-ALSO]
  2839.  
  2840. [EXAMPLE]
  2841.  
  2842.  
  2843. ──────────────────────────────────────────────────────────────────────────────
  2844.  
  2845.  
  2846. [FUNCTION]
  2847.  
  2848. Function  SubPDT(                 PDT            : LONGINT;
  2849.                                   Hours          : WORD;
  2850.                                   Minutes        : WORD;
  2851.                                   Seconds        : WORD;
  2852.                                   Days           : WORD;
  2853.                                   Months         : WORD;
  2854.                                   Years          : WORD      ) : LONGINT;
  2855.  
  2856. [PARAMETERS]
  2857.  
  2858. PDT         Source Packed DateTime Structure
  2859. Hours       Hours to Subtract
  2860. Minutes     Minutes to Subtract
  2861. Seconds     Seconds to Subtract
  2862. Days        Days to Subtract
  2863. Months      Months to Subtract
  2864. Years       Years to Subtract
  2865.  
  2866. [RETURNS]
  2867.  
  2868. Value with Date/Time Subtracted.
  2869.  
  2870. [DESCRIPTION]
  2871.  
  2872. NOTE: Minimum Granularity is 2 Seconds.
  2873.  
  2874. [SEE-ALSO]
  2875.  
  2876. [EXAMPLE]
  2877.  
  2878.  
  2879. ──────────────────────────────────────────────────────────────────────────────
  2880.  
  2881.  
  2882. [FUNCTION]
  2883.  
  2884. Procedure PDTDiff(                PDT1           : LONGINT;
  2885.                                   PDT2           : LONGINT;
  2886.                               VAR Hours          : INTEGER;
  2887.                               VAR Minutes        : INTEGER;
  2888.                               VAR Seconds        : INTEGER;
  2889.                               VAR Days           : INTEGER;
  2890.                               VAR Months         : INTEGER;
  2891.                               VAR Years          : INTEGER   );
  2892.  
  2893. [PARAMETERS]
  2894.  
  2895. PDT1        1st Source Packed DateTime Structure
  2896. PDT2        2nd Source Packed DateTime Structure
  2897. Hours       VAR Returned Hours Difference
  2898. Minutes     VAR Returned Minutes Difference
  2899. Seconds     VAR Returned Seconds Difference
  2900. Days        VAR Returned Days Difference
  2901. Months      VAR Returned Months Difference
  2902. Years       VAR Returned Years Difference
  2903.  
  2904. [RETURNS]
  2905.  
  2906. Function : None
  2907. (VAR     : [Hours] Returned Hours Difference)
  2908. (VAR     : [Hours] Hours Difference)
  2909. (VAR     : [Minutes] Minutes Difference)
  2910. (VAR     : [Seconds] Seconds Difference)
  2911. (VAR     : [Days] Days Difference)
  2912. (VAR     : [Months] Months Difference)
  2913. (VAR     : [Years] Years Difference)
  2914.  
  2915. [DESCRIPTION]
  2916.  
  2917. Time Differend Values are always returned Positive
  2918.  
  2919. [SEE-ALSO]
  2920.  
  2921. [EXAMPLE]
  2922.  
  2923.  
  2924. ──────────────────────────────────────────────────────────────────────────────
  2925.  
  2926.  
  2927. [FUNCTION]
  2928.  
  2929. Function CurrSeconds                                         : REAL;
  2930.  
  2931. [PARAMETERS]
  2932.  
  2933. (None)
  2934.  
  2935. [RETURNS]
  2936.  
  2937. Floating Point Number of Seconds
  2938.  
  2939. [DESCRIPTION]
  2940.  
  2941. Returns the Current Time in Terms of Seconds
  2942.  
  2943. [SEE-ALSO]
  2944.  
  2945. [EXAMPLE]
  2946.  
  2947.  
  2948. ──────────────────────────────────────────────────────────────────────────────
  2949.  
  2950.  
  2951. [FUNCTION]
  2952.  
  2953. Function MarkTime                                              : REAL;
  2954.  
  2955. [PARAMETERS]
  2956.  
  2957. (None)
  2958.  
  2959. [RETURNS]
  2960.  
  2961. Timer Mark
  2962.  
  2963. [DESCRIPTION]
  2964.  
  2965. Returns the Current Time in Seconds when called.
  2966.  
  2967. [SEE-ALSO]
  2968.  
  2969. [EXAMPLE]
  2970.  
  2971.  
  2972. ──────────────────────────────────────────────────────────────────────────────
  2973.  
  2974.  
  2975. [FUNCTION]
  2976.  
  2977. Procedure ClockOn;
  2978.  
  2979. [PARAMETERS]
  2980.  
  2981. (None)
  2982.  
  2983. [RETURNS]
  2984.  
  2985. (None)
  2986.  
  2987. [DESCRIPTION]
  2988.  
  2989. Starts a timer (variable is private to unit)
  2990.  
  2991. [SEE-ALSO]
  2992.  
  2993. [EXAMPLE]
  2994.  
  2995.  
  2996. ──────────────────────────────────────────────────────────────────────────────
  2997.  
  2998.  
  2999. [FUNCTION]
  3000.  
  3001. Function ClockOff                                              : REAL;
  3002.  
  3003. [PARAMETERS]
  3004.  
  3005. (None)
  3006.  
  3007. [RETURNS]
  3008.  
  3009. Number of Seconds since last ClockOn
  3010.  
  3011. [DESCRIPTION]
  3012.  
  3013. Returns the seconds of elapsed time from last ClockOn call.
  3014.  
  3015. Note: actual variable is private to unit.
  3016.  
  3017. [SEE-ALSO]
  3018.  
  3019. [EXAMPLE]
  3020.  
  3021.  
  3022. ──────────────────────────────────────────────────────────────────────────────
  3023.  
  3024.  
  3025. [FUNCTION]
  3026.  
  3027. Function ClockOffStr                                           : STRING;
  3028.  
  3029. [PARAMETERS]
  3030.  
  3031. (None)
  3032.  
  3033. [RETURNS]
  3034.  
  3035. Text Representation of ClockOff Time
  3036.  
  3037. [DESCRIPTION]
  3038.  
  3039. [SEE-ALSO]
  3040.  
  3041. [EXAMPLE]
  3042.  
  3043.  
  3044. ──────────────────────────────────────────────────────────────────────────────
  3045.  
  3046.  
  3047. [FUNCTION]
  3048.  
  3049. Procedure DisplayStopWatch(       TimeDelta      : REAL      );
  3050.  
  3051. [PARAMETERS]
  3052.  
  3053. TimeDelta   Time Difference
  3054.  
  3055. [RETURNS]
  3056.  
  3057. (None)
  3058.  
  3059. [DESCRIPTION]
  3060.  
  3061. Displays the elapsed time since the last ClockOn call.  (Note actual
  3062. variable is private to unit).
  3063.  
  3064. [SEE-ALSO]
  3065.  
  3066. [EXAMPLE]
  3067.  
  3068.  
  3069. ──────────────────────────────────────────────────────────────────────────────
  3070.  
  3071.  
  3072. [FUNCTION]
  3073.  
  3074. Function GetTicksSinceMidnt(  Var Days           : BYTE      ) : LONGINT;
  3075.  
  3076. [PARAMETERS]
  3077.  
  3078. Days        VAR Returned ?
  3079.  
  3080. [RETURNS]
  3081.  
  3082. [DESCRIPTION]
  3083.  
  3084. [SEE-ALSO]
  3085.  
  3086. [EXAMPLE]
  3087.  
  3088.  
  3089. ──────────────────────────────────────────────────────────────────────────────
  3090.  
  3091.  
  3092. [FUNCTION]
  3093.  
  3094. Function SetTicksSinceMidnt(      Ticks          : LONGINT   ) : BOOLEAN;
  3095.  
  3096. [PARAMETERS]
  3097.  
  3098. Ticks       ?
  3099.  
  3100. [RETURNS]
  3101.  
  3102. [DESCRIPTION]
  3103.  
  3104. [SEE-ALSO]
  3105.  
  3106. [EXAMPLE]
  3107.  
  3108.  
  3109. ──────────────────────────────────────────────────────────────────────────────
  3110.  
  3111.  
  3112. [FUNCTION]
  3113.  
  3114. Function GetSysTime(          Var BcdHours       : BYTE;
  3115.                               Var BcdMins        : BYTE;
  3116.                               Var BcdSecs        : BYTE;
  3117.                               Var DSTActive      : BOOLEAN   ) : BOOLEAN;
  3118.  
  3119. [PARAMETERS]
  3120.  
  3121. BcdHours    VAR Returned ?
  3122. BcdMins     VAR Returned ?
  3123. BcdSecs     VAR Returned ?
  3124. DSTActive   VAR Returned ?
  3125.  
  3126. [RETURNS]
  3127.  
  3128. [DESCRIPTION]
  3129.  
  3130. [SEE-ALSO]
  3131.  
  3132. [EXAMPLE]
  3133.  
  3134.  
  3135. ──────────────────────────────────────────────────────────────────────────────
  3136.  
  3137.  
  3138. [FUNCTION]
  3139.  
  3140. Function SetSysTime(              BcdHours       : BYTE;
  3141.                                   BcdMins        : BYTE;
  3142.                                   BcdSecs        : BYTE;
  3143.                                   DSTActive      : BOOLEAN   ) : BOOLEAN;
  3144.  
  3145. [PARAMETERS]
  3146.  
  3147. BcdHours    ?
  3148. BcdMins     ?
  3149. BcdSecs     ?
  3150. DSTActive   ?
  3151.  
  3152. [RETURNS]
  3153.  
  3154. [DESCRIPTION]
  3155.  
  3156. [SEE-ALSO]
  3157.  
  3158. [EXAMPLE]
  3159.  
  3160.  
  3161. ──────────────────────────────────────────────────────────────────────────────
  3162.  
  3163.  
  3164. [FUNCTION]
  3165.  
  3166. Function GetSysDate(          Var BcdDay         : BYTE;
  3167.                               Var BcdMon         : BYTE;
  3168.                               Var BcdYear        : BYTE;
  3169.                               Var BcdCent        : BYTE      ) : BOOLEAN;
  3170.  
  3171. [PARAMETERS]
  3172.  
  3173. BcdDay      VAR Returned ?
  3174. BcdMon      VAR Returned ?
  3175. BcdYear     VAR Returned ?
  3176. BcdCent     VAR Returned ?
  3177.  
  3178. [RETURNS]
  3179.  
  3180. [DESCRIPTION]
  3181.  
  3182. [SEE-ALSO]
  3183.  
  3184. [EXAMPLE]
  3185.  
  3186.  
  3187. ──────────────────────────────────────────────────────────────────────────────
  3188.  
  3189.  
  3190. [FUNCTION]
  3191.  
  3192. Function SetSysDate(              BcdDay         : BYTE;
  3193.                                   BcdMon         : BYTE;
  3194.                                   BcdYear        : BYTE;
  3195.                                   BcdCent        : BYTE      ) : BOOLEAN;
  3196.  
  3197. [PARAMETERS]
  3198.  
  3199. BcdDay      ?
  3200. BcdMon      ?
  3201. BcdYear     ?
  3202. BcdCent     ?
  3203.  
  3204. [RETURNS]
  3205.  
  3206. [DESCRIPTION]
  3207.  
  3208. [SEE-ALSO]
  3209.  
  3210. [EXAMPLE]
  3211.  
  3212.  
  3213. ──────────────────────────────────────────────────────────────────────────────
  3214.  
  3215.  
  3216. [FUNCTION]
  3217.  
  3218. Function SetSysAlarmOn(           BcdHours       : BYTE;
  3219.                                   BcdMins        : BYTE;
  3220.                                   BcdSecs        : BYTE      ) : BOOLEAN;
  3221. [PARAMETERS]
  3222.  
  3223. BcdHours    Alarm Hours in BCD Format
  3224. BcdMins     Alarm Minutes in BCD Format
  3225. BcdSecs     Alarm Seconds in BCD Format
  3226.  
  3227. [RETURNS]
  3228.  
  3229. Whether the Alarm was set to the provided Time  (TRUE=Alarm Set)
  3230.  
  3231. [DESCRIPTION]
  3232.  
  3233. [SEE-ALSO]
  3234.  
  3235. [EXAMPLE]
  3236.  
  3237.  
  3238. ──────────────────────────────────────────────────────────────────────────────
  3239.  
  3240.  
  3241. [FUNCTION]
  3242.  
  3243. Function SetSysAlarmOff                                        : BOOLEAN;
  3244.  
  3245. [PARAMETERS]
  3246.  
  3247. (None)
  3248.  
  3249. [RETURNS]
  3250.  
  3251. Whether the System Alarm is Off (TRUE=Off)
  3252.  
  3253. [DESCRIPTION]
  3254.  
  3255. [SEE-ALSO]
  3256.  
  3257. [EXAMPLE]
  3258.  
  3259.  
  3260. ──────────────────────────────────────────────────────────────────────────────
  3261.  
  3262.  
  3263. [FUNCTION]
  3264.  
  3265. Function DateFormat(              Date           : LONGINT;
  3266.                                   Format         : STRING    ) : STRING;
  3267.  
  3268. [PARAMETERS]
  3269.  
  3270. Date        Date in Longint Format
  3271. Format      Date Formatting String
  3272.  
  3273. [RETURNS]
  3274.  
  3275. Formatted Date Text String
  3276.  
  3277. [DESCRIPTION]
  3278.  
  3279. Returns the Date as a Formatted String
  3280. Possible Format Strings are:
  3281.   "DDMMMYY"   = "08MAY92"   "MMM D, YY"  = "MAY 8, 92"
  3282.   "DDMMMYYYY" = "08MAY1992" "MMM D, YYYY"= "MAY 8, 1992"
  3283.   "MM/DD/YY"  = "05/08/92"  "MM/DD/YYYY" = "05/08/1992"
  3284.   "YYMMMDD"   = "92MAY08"   "YY MMM DD"  = "92 MAY 08"
  3285.   "YYMMDD"    = "9205508"   "YYYY MM DD" = "1992 05 08"
  3286.  
  3287. [SEE-ALSO]
  3288.  
  3289. [EXAMPLE]
  3290.  
  3291.